From 05b9d3c010331e5d2aed5a18fc7a54cdd6aae88f Mon Sep 17 00:00:00 2001 From: Frank Fidanza Date: Mon, 5 Sep 2022 13:54:09 +0200 Subject: [PATCH] debian 11 workaround --- tasks/main.yml | 13 ++++++++++++- vars/bullseye.yml | 2 ++ vars/empty.yml | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 vars/bullseye.yml create mode 100644 vars/empty.yml diff --git a/tasks/main.yml b/tasks/main.yml index 11ea991..cecc6c5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,15 @@ --- +- name: Load OS-specific variables + include_vars: "{{ item }}" + with_first_found: + - "{{ role_path }}/vars/{{ ansible_distribution_release }}.yml" + - "{{ role_path }}/vars/empty.yml" + tags: ['always'] + +- name: Set os_release to compute download URL + set_fact: + __os_release: "{{ os_release | default(ansible_distribution_release) }}" + - name: wkhtmltopdf | check if binary is present find: paths: @@ -18,7 +29,7 @@ - name: wkhtmltopdf | download archive from GitHub get_url: - url: "{{ wkhtmltopdf_base_url }}/{{ wkhtmltopdf_version }}/wkhtmltox_{{ wkhtmltopdf_version }}-1.{{ ansible_distribution_release }}_{{ (ansible_architecture == 'x86_64') | ternary('amd64', 'i386') }}.deb" + url: "{{ wkhtmltopdf_base_url }}/{{ wkhtmltopdf_version }}/wkhtmltox_{{ wkhtmltopdf_version }}-1.{{ __os_release }}_{{ (ansible_architecture == 'x86_64') | ternary('amd64', 'i386') }}.deb" dest: "/tmp/wkhtmltopdf-{{ wkhtmltopdf_version }}-{{ ansible_distribution_release }}.deb" register: wkhtmltopdf_archive diff --git a/vars/bullseye.yml b/vars/bullseye.yml new file mode 100644 index 0000000..c354309 --- /dev/null +++ b/vars/bullseye.yml @@ -0,0 +1,2 @@ +--- +os_release: buster diff --git a/vars/empty.yml b/vars/empty.yml new file mode 100644 index 0000000..0a9599a --- /dev/null +++ b/vars/empty.yml @@ -0,0 +1,2 @@ +--- +#