From f3ba0f0be686b466c4ddfd34ebf8dd5e473347c5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 12 Jul 2018 16:44:20 +0200 Subject: [PATCH] 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: I595862a7cbee4c10ea0744055391754536b7f312 --- tasks/install-apt.yml | 4 ++-- tasks/watcher_init_systemd.yml | 2 +- tasks/watcher_init_upstart.yml | 2 +- tasks/watcher_install.yml | 12 ++++++------ tasks/watcher_service_setup.yml | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tasks/install-apt.yml b/tasks/install-apt.yml index d2921fc..363e2dc 100644 --- a/tasks/install-apt.yml +++ b/tasks/install-apt.yml @@ -20,7 +20,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 with_items: "{{ watcher_distro_packages }}" @@ -30,7 +30,7 @@ pkg: "{{ item }}" state: "{{ watcher_package_state }}" register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 with_items: "{{ watcher_developer_mode_distro_packages }}" diff --git a/tasks/watcher_init_systemd.yml b/tasks/watcher_init_systemd.yml index 05bc61a..860f69f 100644 --- a/tasks/watcher_init_systemd.yml +++ b/tasks/watcher_init_systemd.yml @@ -51,6 +51,6 @@ - name: Reload the systemd daemon systemd: daemon_reload: "yes" - when: systemd_init | changed + when: systemd_init is changed notify: - Restart watcher services diff --git a/tasks/watcher_init_upstart.yml b/tasks/watcher_init_upstart.yml index f768ea7..07972ba 100644 --- a/tasks/watcher_init_upstart.yml +++ b/tasks/watcher_init_upstart.yml @@ -26,7 +26,7 @@ - name: Reload init scripts command: initctl reload-configuration - when: upstart_init | changed + when: upstart_init is changed notify: - Restart watcher services diff --git a/tasks/watcher_install.yml b/tasks/watcher_install.yml index 90721f5..b816eeb 100644 --- a/tasks/watcher_install.yml +++ b/tasks/watcher_install.yml @@ -36,7 +36,7 @@ {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 @@ -59,21 +59,21 @@ file: path: "{{ watcher_bin | dirname }}" state: absent - when: watcher_get_venv | changed + when: watcher_get_venv is changed - name: Create watcher venv dir file: path: "{{ watcher_bin | dirname }}" state: directory register: watcher_venv_dir - when: watcher_get_venv | changed + when: watcher_get_venv is changed - name: Unarchive pre-built venv unarchive: src: "/var/cache/{{ watcher_venv_download_url | basename }}" dest: "{{ watcher_bin | dirname }}" copy: "no" - when: watcher_get_venv | changed + when: watcher_get_venv is changed notify: Restart watcher services - name: Install pip packages @@ -87,7 +87,7 @@ {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 when: watcher_get_venv | failed or watcher_get_venv | skipped @@ -109,6 +109,6 @@ --no-pip \ --no-setuptools \ --no-wheel - when: watcher_get_venv | changed + when: watcher_get_venv is changed tags: - skip_ansible_lint diff --git a/tasks/watcher_service_setup.yml b/tasks/watcher_service_setup.yml index 07dce75..06063a3 100644 --- a/tasks/watcher_service_setup.yml +++ b/tasks/watcher_service_setup.yml @@ -25,7 +25,7 @@ description: "{{ watcher_service_description }}" insecure: "{{ keystone_service_adminuri_insecure }}" register: add_service - until: add_service|success + until: add_service is success retries: 5 delay: 2 no_log: true @@ -44,7 +44,7 @@ insecure: "{{ keystone_service_adminuri_insecure }}" register: add_service when: not watcher_service_in_ldap | bool - until: add_service|success + until: add_service is success retries: 5 delay: 10 no_log: true @@ -62,7 +62,7 @@ insecure: "{{ keystone_service_adminuri_insecure }}" register: add_admin_role when: not watcher_service_in_ldap | bool - until: add_admin_role|success + until: add_admin_role is success retries: 5 delay: 10 no_log: true @@ -87,7 +87,7 @@ - url: "{{ watcher_service_internalurl }}" interface: "internal" register: add_service - until: add_service|success + until: add_service is success retries: 5 delay: 10 no_log: true