From 56444f7f5ac88ba4b4f20b234bebf14249b4591c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 28 Jan 2022 13:59:24 +0100 Subject: [PATCH] chore: handle rpm release version --- defaults/main.yml | 2 +- vars/main.yml | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index dc45c48..6005a6d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- -cups_version: 2.4.0-1 +cups_version: 2.4.0 # @var cups_packages_extra:description: > # Install dependencies or custom driver packages diff --git a/vars/main.yml b/vars/main.yml index 135f4b7..b931bcc 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,10 +1,12 @@ --- +__cups_version_comp: "{{ cups_version | split('-') }}" + __cups_download_url: https://gitea.rknet.org/rpmbuild/cups/releases/download/v{{ cups_version }} __cups_packages: - - "{{ __cups_download_url }}/cups-{{ cups_version }}.el{{ ansible_distribution_major_version }}.x86_64.rpm" - - "{{ __cups_download_url }}/cups-libs-{{ cups_version }}.el{{ ansible_distribution_major_version }}.x86_64.rpm" - - "{{ __cups_download_url }}/cups-lpd-{{ cups_version }}.el{{ ansible_distribution_major_version }}.x86_64.rpm" - - "{{ __cups_download_url }}/cups-devel-{{ cups_version }}.el{{ ansible_distribution_major_version }}.x86_64.rpm" + - "{{ __cups_download_url }}/cups-{{ __cups_version_comp[0] }}-{{ __cups_version_comp[1] | default('0') }}.el{{ ansible_distribution_major_version }}.x86_64.rpm" + - "{{ __cups_download_url }}/cups-libs-{{ __cups_version_comp[0] }}-{{ __cups_version_comp[1] | default('0') }}.el{{ ansible_distribution_major_version }}.x86_64.rpm" + - "{{ __cups_download_url }}/cups-lpd-{{ __cups_version_comp[0] }}-{{ __cups_version_comp[1] | default('0') }}.el{{ ansible_distribution_major_version }}.x86_64.rpm" + - "{{ __cups_download_url }}/cups-devel-{{ __cups_version_comp[0] }}-{{ __cups_version_comp[1] | default('0') }}.el{{ ansible_distribution_major_version }}.x86_64.rpm" __pam_config: - type: "auth"