Fix usage of "|" for tests

With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.

This should fix it.

Change-Id: Ida90a5a717adaf07ebf2ee6f04136fe920cfe46b
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:20 +02:00
parent 63fd37eb5e
commit 2d924b773d
6 changed files with 12 additions and 12 deletions

View File

@ -13,11 +13,11 @@
apt_repository:
repo: "deb https://example.com/foo/ bar baz"
register: add_repo
until: add_repo|success
until: add_repo is success
- name: APT cache updates explicitly enabled and retries
apt_repository:
repo: "deb https://example.com/foo/ bar baz"
update_cache: true
register: add_repo
until: add_repo|success
until: add_repo is success

View File

@ -10,4 +10,4 @@
repo: "deb https://example.com/foo/ bar baz"
update_cache: false
register: add_repo
until: add_repo|success
until: add_repo is success

View File

@ -19,7 +19,7 @@
register: _update
retries: 5
delay: 2
until: _update | succeeded
until: _update is succeeded
changed_when: false
when:
- ansible_pkg_mgr == 'apt'

View File

@ -193,7 +193,7 @@
command: "ifdown {{ item.name | default('br-mgmt') }}:0"
when:
- ansible_pkg_mgr in ['yum', 'dnf']
- network_interfaces_rhel | changed
- network_interfaces_rhel is changed
- item.alias is defined
with_items: "{{ bridges }}"
@ -208,7 +208,7 @@
command: "ifup {{ item.name | default('br-mgmt') }}:0"
when:
- ansible_pkg_mgr in ['yum', 'dnf']
- network_interfaces_rhel | changed
- network_interfaces_rhel is changed
- item.alias is defined
with_items: "{{ bridges }}"

View File

@ -29,16 +29,16 @@
- name: Get a loopback device for cinder file
command: losetup -f
when: cinder_create | changed
when: cinder_create is changed
register: cinder_losetup
- name: Create the loopback device
command: "losetup {{ cinder_losetup.stdout }} /openstack/cinder.img"
when: cinder_create | changed
when: cinder_create is changed
- name: Make LVM physical volume on the cinder device
command: "{{ item }}"
when: cinder_create | changed
when: cinder_create is changed
with_items:
- "pvcreate {{ cinder_losetup.stdout }}"
- "pvscan"
@ -47,5 +47,5 @@
lvg:
vg: cinder-volumes
pvs: "{{ cinder_losetup.stdout }}"
when: cinder_create | changed
when: cinder_create is changed

View File

@ -70,7 +70,7 @@
fstype: xfs
opts: '-K'
dev: "/opt/{{ container_name}}_{{ item }}.img"
when: swift_create | changed
when: swift_create is changed
with_items:
- 'swift1'
- 'swift2'
@ -89,7 +89,7 @@
- 'swift1'
- 'swift2'
register: mount_status
until: mount_status | success
until: mount_status is success
retries: 5
delay: 2
delegate_to: "{{ physical_host }}"