Skip to content

Commit

Permalink
Merge pull request #166 from coopdevs/adapt-role-to-ubuntu-nobel
Browse files Browse the repository at this point in the history
Adapt role to Ubuntu Nobel (24.04)
  • Loading branch information
danypr92 authored Dec 10, 2024
2 parents 6893f71 + de17803 commit 7a0b406
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ odoo_role_dev_helpers: true
# 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 %}"
wkhtmltox_version_nobel: "0.12.6-2build2"
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 %}"
9 changes: 8 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@
- name: Download and install wkhtmltopdf only if not already present at any version
apt:
deb: "https://github.com/wkhtmltopdf/packaging/releases/download/{{ wkhtmltox_version }}/wkhtmltox_{{ wkhtmltox_version }}.{{ ansible_distribution_release }}_amd64.deb"
when: wkhtmltox_installed.rc == 1
when: wkhtmltox_installed.rc == 1 and ansible_distribution_version < "24.04"

- name: Install wkhtmltopdf only if not already present at any version
apt:
update_cache: true
pkg:
- "wkhtmltopdf={{ wkhtmltox_version }}"
when: wkhtmltox_installed.rc == 1 and ansible_distribution_version >= "24.04"

- import_tasks: pyenv.yml
become: true
Expand Down

0 comments on commit 7a0b406

Please sign in to comment.