From ac39a1706223bd18692839f649f914d54a11ffbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pelayo=20Garc=C3=ADa?= <25091358+oyale@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:48:00 +0100 Subject: [PATCH] fix: conditional wkhtmltox version fix #147 --- defaults/main.yml | 5 +++++ tasks/main.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 704c2e0..66f4195 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -111,3 +111,8 @@ odoo_role_logrotate_odoo: compress delaycompress } + +# wkhtmltopdf version +wkhtmltox_version_jammy: "0.12.6.1-2" +wkhtmltox_version_bionic: "0.12.6.1" +wkhtmltox_version: "{% if ansible_distribution_release in ['jammy', 'bullseye'] %}{{ wkhtmltox_version_jammy }}{% else %}{{wkhtmltox_version_bionic}}{% endif %}" \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 1cbf8d4..82a95a3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -38,7 +38,7 @@ - name: Download and install wkhtmltopdf only if not already present at any version apt: - deb: "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.{{ ansible_distribution_release }}_amd64.deb" + deb: "https://github.com/wkhtmltopdf/packaging/releases/download/{{ wkhtmltox_version }}/wkhtmltox_{{ wkhtmltox_version }}.{{ ansible_distribution_release }}_amd64.deb" when: wkhtmltox_installed.rc == 1 - import_tasks: pyenv.yml