2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-22 20:19:01 +00:00

fix(ansible): deprecated warnings for | expression

This commit is contained in:
Gavin D'souza 2019-12-04 18:40:07 +05:30
parent fd7d59d2be
commit 498e777b57
5 changed files with 17 additions and 17 deletions

View File

@ -11,7 +11,7 @@
- tcl8.5-dev
- tk8.5-dev
state: present
when: ansible_distribution_version | version_compare('8', 'lt')
when: ansible_distribution_version is version_compare('8', 'lt')
- name: install pillow prerequisites for Debian >= 8
apt:
@ -21,7 +21,7 @@
- tcl8.5-dev
- tk8.5-dev
state: present
when: ansible_distribution_version | version_compare('8', 'ge')
when: ansible_distribution_version is version_compare('8', 'ge')
- name: install pdf prerequisites debian
apt:

View File

@ -9,7 +9,7 @@
- tk8.5-dev
state: present
force: yes
when: ansible_distribution_version | version_compare('14.04', 'lt')
when: ansible_distribution_version is version_compare('14.04', 'lt')
- name: install pillow prerequisites for Ubuntu >= 14.04
apt:
@ -20,7 +20,7 @@
- tk8.6-dev
state: present
force: yes
when: ansible_distribution_version | version_compare('14.04', 'ge')
when: ansible_distribution_version is version_compare('14.04', 'ge')
- name: install pdf prerequisites for Ubuntu < 18.04
apt:
@ -28,7 +28,7 @@
- libssl-dev
state: present
force: yes
when: ansible_distribution_version | version_compare('18.04', 'lt')
when: ansible_distribution_version is version_compare('18.04', 'lt')
- name: install pdf prerequisites for Ubuntu >= 18.04
apt:
@ -36,6 +36,6 @@
- libssl1.0-dev
state: present
force: yes
when: ansible_distribution_version | version_compare('18.04', 'ge')
when: ansible_distribution_version is version_compare('18.04', 'ge')
...

View File

@ -1,11 +1,11 @@
---
- name: Add apt key for mariadb for Debian <= 8
apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=0xcbcb082a1bb943db state=present
when: ansible_distribution_major_version | version_compare('8', 'le')
when: ansible_distribution_major_version is version_compare('8', 'le')
- name: Add apt key for mariadb for Debian > 8
apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=0xF1656F24C74CD1D8 state=present
when: ansible_distribution_major_version | version_compare('8', 'gt')
when: ansible_distribution_major_version is version_compare('8', 'gt')
- name: Add apt repository
apt_repository:

View File

@ -3,14 +3,14 @@
apt_key:
url: http://nginx.org/keys/nginx_signing.key
state: present
when: ansible_distribution == 'Debian' and ansible_distribution_version | version_compare('8', 'lt')
when: ansible_distribution == 'Debian' and ansible_distribution_version is version_compare('8', 'lt')
- name: Add nginx apt repository for Debian < 8
apt_repository:
repo: 'deb [arch=amd64,i386] http://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx'
state: present
when: ansible_distribution == 'Debian' and ansible_distribution_version | version_compare('8', 'lt')
when: ansible_distribution == 'Debian' and ansible_distribution_version is version_compare('8', 'lt')
- name: Ensure nginx is installed.
apt:
pkg: nginx

View File

@ -10,28 +10,28 @@
when: packer.stat.exists
- include_tasks: debian_family.yml
when: ansible_os_family == 'Debian' and packer.stat.exists == False
when: ansible_os_family == 'Debian' and packer.stat.exists == False
- include_tasks: redhat_family.yml
when: ansible_os_family == "RedHat" and packer.stat.exists == False
when: ansible_os_family == "RedHat" and packer.stat.exists == False
- name: Delete packer if < 1.2.1
file:
state: absent
path: /opt/packer
when: (packer.stat.exists) and (packer_version | version_compare('1.2.1', '<'))
when: (packer.stat.exists) and (packer_version is version_compare('1.2.1', '<'))
- name: Download packer zip file
command: chdir=/opt/ wget https://releases.hashicorp.com/packer/1.2.1/packer_1.2.1_linux_amd64.zip
when: (packer.stat.exists == False) or (packer_version | version_compare('1.2.1', '<'))
when: (packer.stat.exists == False) or (packer_version is version_compare('1.2.1', '<'))
- name: Unzip the packer binary in /opt
command: chdir=/opt/ unzip packer_1.2.1_linux_amd64.zip
when: (packer.stat.exists == False) or (packer_version | version_compare('1.2.1', '<'))
when: (packer.stat.exists == False) or (packer_version is version_compare('1.2.1', '<'))
- name: Remove the downloaded packer zip file
file:
state: absent
path: /opt/packer_1.2.1_linux_amd64.zip
when: (packer.stat.exists == False) or (packer_version | version_compare('1.2.1', '<'))
when: (packer.stat.exists == False) or (packer_version is version_compare('1.2.1', '<'))
...