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: I70c853d9aba11eb91ab25f7a29417d0ec50fdf3d
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:21 +02:00 committed by Jesse Pretorius (odyssey4me)
parent 2239fb14f6
commit fd498ad456
9 changed files with 21 additions and 21 deletions

View File

@ -36,7 +36,7 @@
url: "{{ item.url | default(omit) }}"
state: "present"
register: add_keys
until: add_keys | success
until: add_keys is success
retries: 5
delay: 2
with_items: "{{ rabbitmq_gpg_keys }}"
@ -51,7 +51,7 @@
url: "{{ item.fallback_url | default(omit) }}"
state: "present"
register: add_keys_fallback
until: add_keys_fallback | success
until: add_keys_fallback is success
retries: 5
delay: 2
with_items: "{{ rabbitmq_gpg_keys }}"
@ -108,7 +108,7 @@
- (add_rabbitmq_repos is mapping and add_rabbitmq_repos | changed) or
(add_erlang_repos is mapping and add_erlang_repos | changed)
register: update_apt_cache
until: update_apt_cache | success
until: update_apt_cache is success
retries: 5
delay: 2
tags:
@ -121,7 +121,7 @@
update_cache: yes
cache_valid_time: "{{ cache_timeout }}"
register: install_packages
until: install_packages | success
until: install_packages is success
retries: 5
delay: 2
tags:
@ -142,7 +142,7 @@
name: "{{ rabbitmq_distro_packages }}"
state: "{{ rabbitmq_package_state }}"
register: install_packages
until: install_packages|success
until: install_packages is success
retries: 5
delay: 2
when:

View File

@ -19,7 +19,7 @@
state: present
key: "{{ item.keyserver }}/{{ item.key_name }}"
register: add_keys
until: add_keys | success
until: add_keys is success
retries: 5
delay: 2
with_items: "{{ rabbitmq_gpg_keys }}"
@ -32,7 +32,7 @@
state: present
key: "{{ item.fallback_keyserver }}/{{ item.key_name }}"
register: add_keys_fallback
until: add_keys_fallback | success
until: add_keys_fallback is success
retries: 5
delay: 2
with_items: "{{ rabbitmq_gpg_keys }}"

View File

@ -24,7 +24,7 @@
state: present
key: "{{ item.keyserver }}/{{ item.key_name }}"
register: add_keys
until: add_keys | success
until: add_keys is success
retries: 5
delay: 2
with_items: "{{ rabbitmq_gpg_keys }}"
@ -37,7 +37,7 @@
state: present
key: "{{ item.fallback_keyserver }}/{{ item.key_name }}"
register: add_keys_fallback
until: add_keys_fallback | success
until: add_keys_fallback is success
retries: 5
delay: 2
with_items: "{{ rabbitmq_gpg_keys }}"
@ -98,6 +98,6 @@
systemd:
daemon_reload: yes
when:
- rabbitmq_server_service_added | changed
- rabbitmq_server_service_added is changed
tags:
- rabbitmq-config

View File

@ -30,7 +30,7 @@
command: >
rabbitmqctl join_cluster "rabbit@{{ rabbitmq_primary_cluster_node.split('.')[0] }}"
register: rabbit_join_cluster
until: rabbit_join_cluster|success
until: rabbit_join_cluster is success
retries: 5
delay: 2
tags:
@ -43,7 +43,7 @@
- name: Start rabbitmq app
command: rabbitmqctl start_app
register: rabbit_start_app
until: rabbit_start_app|success
until: rabbit_start_app is success
retries: 5
delay: 2
tags:

View File

@ -25,7 +25,7 @@
systemd:
daemon_reload: yes
when:
- install_rabbitmq | changed
- install_rabbitmq is changed
tags:
- rabbitmq-apt-packages
- rabbitmq-yum-packages

View File

@ -55,8 +55,8 @@
systemd:
daemon_reload: yes
when:
- rabbit_resource_limit | changed
- rabbit_restart_on_failure | changed
- rabbit_resource_limit is changed
- rabbit_restart_on_failure is changed
tags:
- rabbitmq-config
# don't trigger ANSIBLE0016
@ -86,7 +86,7 @@
- include: rabbitmq_restart.yml
static: no
when: rabbit_config|changed or rabbitmq_plugin|changed or rabbitmq_policy|changed
when: rabbit_config is changed or rabbitmq_plugin is changed or rabbitmq_policy is changed
# This is being done because the rabbitctl command used by the module
# is not very effective at returning proper status codes for failure

View File

@ -22,7 +22,7 @@
register: package_download
retries: 3
delay: 10
until: package_download|success
until: package_download is success
when: rabbitmq_install_method == 'file'
tags:
- rabbitmq-package-deb

View File

@ -25,10 +25,10 @@
- include: rabbitmq_stopped.yml
static: no
when:
- cookie_set | changed
- cookie_set is changed
- include: rabbitmq_started.yml
static: no
when:
- cookie_set | changed
- cookie_set is changed

View File

@ -50,8 +50,8 @@
set_fact:
installed_rabbitmq: "{{ item }}"
when:
- not item | skipped
- item | changed
- not item is skipped
- item is changed
with_items:
- "{{ installed_rabbitmq_deb }}"
- "{{ installed_rabbitmq_rpm }}"