diff --git a/playbooks/common-tasks/os-lxc-container-setup.yml b/playbooks/common-tasks/os-lxc-container-setup.yml index afc4d87e18..d51aef68dd 100644 --- a/playbooks/common-tasks/os-lxc-container-setup.yml +++ b/playbooks/common-tasks/os-lxc-container-setup.yml @@ -91,7 +91,7 @@ retries: 3 delay: 5 when: - - (_mc is defined and _mc | changed) or (_ec is defined and _ec | changed) + - (_mc is defined and _mc is changed) or (_ec is defined and _ec is changed) # Due to https://github.com/ansible/ansible-modules-extras/issues/2691 # this uses the LXC CLI tools to ensure that we get logging. @@ -111,7 +111,7 @@ - container_stop.rc not in [0, 2] when: - lxc_container_allow_restarts | default(True) | bool - - (_mc is defined and _mc | changed) or (_ec is defined and _ec | changed) + - (_mc is defined and _mc is changed) or (_ec is defined and _ec is changed) - _lxc_container_state.stdout.find('RUNNING') != -1 tags: - common-lxc @@ -129,7 +129,7 @@ until: container_start is success retries: 3 when: - - (_mc is defined and _mc | changed) or (_ec is defined and _ec | changed) + - (_mc is defined and _mc is changed) or (_ec is defined and _ec is changed) tags: - common-lxc @@ -140,6 +140,6 @@ sleep: "{{ lxc_container_wait_params.sleep | default(omit) }}" timeout: "{{ lxc_container_wait_params.timeout | default(omit) }}" when: - - (_mc is defined and _mc | changed) or (_ec is defined and _ec | changed) + - (_mc is defined and _mc is changed) or (_ec is defined and _ec is changed) tags: - common-lxc diff --git a/playbooks/common-tasks/package-cache-proxy.yml b/playbooks/common-tasks/package-cache-proxy.yml index 8365fdda52..d7abf99245 100644 --- a/playbooks/common-tasks/package-cache-proxy.yml +++ b/playbooks/common-tasks/package-cache-proxy.yml @@ -35,7 +35,7 @@ delay: 2 when: - _apt_proxy_removed is mapping - - _apt_proxy_removed | changed + - _apt_proxy_removed is changed tags: - common-proxy diff --git a/playbooks/common-tasks/set-pip-vars.yml b/playbooks/common-tasks/set-pip-vars.yml index c9b3b8e884..3887321d7c 100644 --- a/playbooks/common-tasks/set-pip-vars.yml +++ b/playbooks/common-tasks/set-pip-vars.yml @@ -66,7 +66,7 @@ {{ ((upper_constraints_check.status | default(503)) != 200) | ternary(__upstream_constraints, __pip_install_upper_constraints) }} vars: # Use https when Python with native SNI support is available - __pip_install_upper_constraints_proto: "{{ ansible_python_version | version_compare('2.7.9', '>=') | ternary('https','http') }}" + __pip_install_upper_constraints_proto: "{{ (ansible_python_version is version_compare('2.7.9', '>=')) | ternary('https','http') }}" __upstream_constraints: >- /opt/global-requirement-pins.txt --constraint {{ __pip_install_upper_constraints_proto }}://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?id={{ requirements_git_install_branch | regex_replace(' #.*$','') }} diff --git a/tests/roles/bootstrap-host/tasks/prepare_data_disk.yml b/tests/roles/bootstrap-host/tasks/prepare_data_disk.yml index 80e64713e5..ff5757f324 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_data_disk.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_data_disk.yml @@ -42,7 +42,7 @@ state: absent when: - bootstrap_host_data_disk_device_force | bool - - item.device | search(bootstrap_host_data_disk_device) + - item.device is search(bootstrap_host_data_disk_device) with_items: - "{{ ansible_mounts }}"