Use version() instad of version_compare()
This changed in Ansible 2.5 apparently. See: https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
# Dependencies certbot checks for on its first run. I set them in a fact so that
|
||||
# I can pass the list directly to the apt module to install in one transaction.
|
||||
- name: Set certbot dependencies (Debian 10)
|
||||
when: ansible_distribution == 'Debian' and ansible_distribution_major_version is version_compare('10', '==')
|
||||
when: ansible_distribution == 'Debian' and ansible_distribution_major_version is version('10', '==')
|
||||
set_fact:
|
||||
certbot_dependencies:
|
||||
- augeas-lenses
|
||||
@ -68,7 +68,7 @@
|
||||
# Dependencies certbot checks for on its first run. I set them in a fact so that
|
||||
# I can pass the list directly to the apt module to install in one transaction.
|
||||
- name: Set certbot dependencies (Debian 9)
|
||||
when: ansible_distribution == 'Debian' and ansible_distribution_major_version is version_compare('9', '==')
|
||||
when: ansible_distribution == 'Debian' and ansible_distribution_major_version is version('9', '==')
|
||||
set_fact:
|
||||
certbot_dependencies:
|
||||
- augeas-doc
|
||||
@ -120,7 +120,7 @@
|
||||
# Dependencies certbot checks for on its first run. I set them in a fact so that
|
||||
# I can pass the list directly to the apt module to install in one transaction.
|
||||
- name: Set certbot dependencies (Ubuntu 16.04)
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('16.04', '==')
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('16.04', '==')
|
||||
set_fact:
|
||||
certbot_dependencies:
|
||||
- augeas-doc
|
||||
@ -163,7 +163,7 @@
|
||||
# Dependencies certbot checks for on its first run. I set them in a fact so that
|
||||
# I can pass the list directly to the apt module to install in one transaction.
|
||||
- name: Set certbot dependencies (Ubuntu 18.04)
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('18.04', '==')
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('18.04', '==')
|
||||
set_fact:
|
||||
certbot_dependencies:
|
||||
- augeas-lenses
|
||||
|
Reference in New Issue
Block a user