Skip to content

Commit ac39a17

Browse files
authored
fix: conditional wkhtmltox version
fix #147
1 parent e62751d commit ac39a17

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,8 @@ odoo_role_logrotate_odoo:
111111
compress
112112
delaycompress
113113
}
114+
115+
# wkhtmltopdf version
116+
wkhtmltox_version_jammy: "0.12.6.1-2"
117+
wkhtmltox_version_bionic: "0.12.6.1"
118+
wkhtmltox_version: "{% if ansible_distribution_release in ['jammy', 'bullseye'] %}{{ wkhtmltox_version_jammy }}{% else %}{{wkhtmltox_version_bionic}}{% endif %}"

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
- name: Download and install wkhtmltopdf only if not already present at any version
4040
apt:
41-
deb: "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.{{ ansible_distribution_release }}_amd64.deb"
41+
deb: "https://github.com/wkhtmltopdf/packaging/releases/download/{{ wkhtmltox_version }}/wkhtmltox_{{ wkhtmltox_version }}.{{ ansible_distribution_release }}_amd64.deb"
4242
when: wkhtmltox_installed.rc == 1
4343

4444
- import_tasks: pyenv.yml

0 commit comments

Comments
 (0)