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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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