Skip to content

Commit de17803

Browse files
committed
adapt role to Ubuntu Nobel (24.04)
1 parent 5c54b68 commit de17803

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,5 @@ odoo_role_dev_helpers: true
120120
# wkhtmltopdf version
121121
wkhtmltox_version_jammy: "0.12.6.1-2"
122122
wkhtmltox_version_bionic: "0.12.6-1"
123-
wkhtmltox_version: "{% if ansible_distribution_release in ['jammy', 'bullseye'] %}{{ wkhtmltox_version_jammy }}{% else %}{{wkhtmltox_version_bionic}}{% endif %}"
123+
wkhtmltox_version_nobel: "0.12.6-2build2"
124+
wkhtmltox_version: "{% if ansible_distribution_release in ['jammy', 'bullseye'] %}{{ wkhtmltox_version_jammy }}{% elif ansible_distribution_release == 'bionic' %}{{wkhtmltox_version_bionic}}{% else %}{{ wkhtmltox_version_nobel }}{% endif %}"

tasks/main.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@
4444
- name: Download and install wkhtmltopdf only if not already present at any version
4545
apt:
4646
deb: "https://github.com/wkhtmltopdf/packaging/releases/download/{{ wkhtmltox_version }}/wkhtmltox_{{ wkhtmltox_version }}.{{ ansible_distribution_release }}_amd64.deb"
47-
when: wkhtmltox_installed.rc == 1
47+
when: wkhtmltox_installed.rc == 1 and ansible_distribution_version < "24.04"
48+
49+
- name: Install wkhtmltopdf only if not already present at any version
50+
apt:
51+
update_cache: true
52+
pkg:
53+
- "wkhtmltopdf={{ wkhtmltox_version }}"
54+
when: wkhtmltox_installed.rc == 1 and ansible_distribution_version >= "24.04"
4855

4956
- import_tasks: pyenv.yml
5057
become: true

0 commit comments

Comments
 (0)