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 1/2] 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 From eb346897039ee6d703294b115339a87600a1e8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pelayo=20Garc=C3=ADa?= <25091358+oyale@users.noreply.github.com> Date: Tue, 31 Jan 2023 10:54:07 +0100 Subject: [PATCH 2/2] fix: version number for wkhtmltox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: César López Ramírez --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 66f4195..21f4beb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -114,5 +114,5 @@ odoo_role_logrotate_odoo: # wkhtmltopdf version wkhtmltox_version_jammy: "0.12.6.1-2" -wkhtmltox_version_bionic: "0.12.6.1" +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