From 0a15c5ecb29d8a6b694bcdf98fd24caae76545c2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 12 Jul 2018 16:44:21 +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: I38d658d79cfc43e0096d4ffc092410ea22410872 --- tasks/magnum_install.yml | 16 ++++++++-------- tasks/magnum_service_setup.yml | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tasks/magnum_install.yml b/tasks/magnum_install.yml index ca1715c..671a681 100644 --- a/tasks/magnum_install.yml +++ b/tasks/magnum_install.yml @@ -20,7 +20,7 @@ update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}" register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 @@ -42,7 +42,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 @@ -65,7 +65,7 @@ file: path: "{{ magnum_bin | dirname }}" state: absent - when: magnum_get_venv | changed + when: magnum_get_venv is changed - name: Create magnum venv dir file: @@ -73,14 +73,14 @@ state: directory mode: "0755" register: magnum_venv_dir - when: magnum_get_venv | changed + when: magnum_get_venv is changed - name: Unarchive pre-built venv unarchive: src: "/var/cache/{{ magnum_venv_download_url | basename }}" dest: "{{ magnum_bin | dirname }}" copy: "no" - when: magnum_get_venv | changed + when: magnum_get_venv is changed notify: Restart magnum services - name: Install pip packages @@ -94,7 +94,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: magnum_get_venv | failed or magnum_get_venv | skipped @@ -106,7 +106,7 @@ state: "absent" when: - ansible_pkg_mgr in ['yum', 'zypper'] - - magnum_get_venv | changed + - magnum_get_venv is changed # NOTE(odyssey4me): # We reinitialize the venv to ensure that the right @@ -124,7 +124,7 @@ --no-pip \ --no-setuptools \ --no-wheel - when: magnum_get_venv | changed + when: magnum_get_venv is changed tags: - skip_ansible_lint diff --git a/tasks/magnum_service_setup.yml b/tasks/magnum_service_setup.yml index 86f48a9..c8e68c1 100644 --- a/tasks/magnum_service_setup.yml +++ b/tasks/magnum_service_setup.yml @@ -25,7 +25,7 @@ service_type: "{{ magnum_service_type }}" description: "{{ magnum_service_description }}" register: add_magnum_service - until: add_magnum_service |success + until: add_magnum_service is success retries: 5 delay: 2 no_log: True @@ -42,7 +42,7 @@ tenant_name: "{{ magnum_service_project_name }}" password: "{{ magnum_service_password |default('changeme') }}" register: add_magnum_user - until: add_magnum_user |success + until: add_magnum_user is success retries: 5 delay: 2 no_log: True @@ -59,7 +59,7 @@ role_name: "{{ item }}" insecure: "{{ keystone_service_adminuri_insecure }}" register: ensure_magnum_roles - until: ensure_magnum_roles |success + until: ensure_magnum_roles is success retries: 5 delay: 2 with_items: "{{ magnum_service_role_names }}" @@ -84,7 +84,7 @@ - url: "{{ magnum_service_adminurl }}" interface: "admin" register: add_magnum_endpoints - until: add_magnum_endpoints |success + until: add_magnum_endpoints is success retries: 5 delay: 2 no_log: True @@ -100,7 +100,7 @@ domain_name: "{{ magnum_trustee_domain_name }}" domain_enabled: true register: add_magnum_trustee_user - until: add_magnum_trustee_user |success + until: add_magnum_trustee_user is success retries: 5 delay: 2 no_log: True @@ -118,7 +118,7 @@ project_name: "{{ magnum_service_project_name }}" password: "{{ magnum_trustee_password |default('changeme') }}" register: add_magnum_trustee_user - until: add_magnum_trustee_user |success + until: add_magnum_trustee_user is success retries: 5 delay: 2 no_log: True @@ -135,7 +135,7 @@ domain_name: "{{ magnum_trustee_domain_name }}" insecure: "{{ keystone_service_adminuri_insecure }}" register: ensure_magnum_trustee_roles - until: ensure_magnum_trustee_roles |success + until: ensure_magnum_trustee_roles is success retries: 5 delay: 2 with_items: "{{ magnum_trustee_domain_admin_roles }}"