diff --git a/defaults/main.yml b/defaults/main.yml index 704c2e0..21f4beb 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