From baf8e9b64da790305f34edd86986069481865491 Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Wed, 15 Jan 2020 16:25:48 +0100 Subject: [PATCH] Fix deprecation warning message from Ansible Using tests as filters is deprecated. Instead of using `result|succeeded` we should use `result is succeeded`. This feature will be removed in Ansible version 2.9. Change-Id: Id66444aa9757f38d40e3da36e4f27f80a707cf95 --- .../bifrost-ironic-install/tasks/download_ipa_image.yml | 4 ++-- playbooks/roles/bifrost-ironic-install/tasks/get_ipxe.yml | 4 ++-- .../roles/bifrost-ironic-install/tasks/pip_install.yml | 6 +++--- .../roles/bifrost-keystone-install/tasks/pip_install.yml | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml b/playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml index fe732f735..da2296f8f 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/download_ipa_image.yml @@ -54,7 +54,7 @@ # Keep downloading it until we get a good copy force: yes register: ipa_kernel_download_done - until: ipa_kernel_download_done|succeeded or + until: ipa_kernel_download_done is succeeded or (ipa_kernel_download_done|failed) retries: 5 delay: 10 @@ -97,7 +97,7 @@ # Keep downloading it until we get a good copy force: yes register: ipa_ramdisk_download_done - until: ipa_ramdisk_download_done|succeeded or + until: ipa_ramdisk_download_done is succeeded or (ipa_ramdisk_download_done|failed and ipa_ramdisk_download_done.status_code == 404) retries: 5 delay: 10 diff --git a/playbooks/roles/bifrost-ironic-install/tasks/get_ipxe.yml b/playbooks/roles/bifrost-ironic-install/tasks/get_ipxe.yml index e7294e807..57509855d 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/get_ipxe.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/get_ipxe.yml @@ -30,7 +30,7 @@ dest: "{{ ipxe_dir }}/{{ item }}" force: yes register: ipxe_files_download_done - until: ipxe_files_download_done|succeeded + until: ipxe_files_download_done is succeeded retries: 5 delay: 10 with_items: @@ -44,7 +44,7 @@ dest: "{{ ipxe_dir }}/{{ item }}" force: yes register: ipxe_efi_binary_download_done - until: ipxe_efi_binary_download_done|succeeded + until: ipxe_efi_binary_download_done is succeeded retries: 5 delay: 10 with_items: diff --git a/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml b/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml index c42a9071b..da2745b2e 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/pip_install.yml @@ -29,7 +29,7 @@ extra_args: "{{ extra_args | default(omit) }}" requirements: "{{ requirements_file | default(omit) }}" register: pip_package_install_done - until: pip_package_install_done|succeeded + until: pip_package_install_done is succeeded retries: 5 delay: 10 when: (source_install is not defined or source_install == false) and enable_venv|bool @@ -42,7 +42,7 @@ extra_args: "{{ extra_args | default(omit) }}" requirements: "{{ requirements_file | default(omit) }}" register: pip_package_install_done - until: pip_package_install_done|succeeded + until: pip_package_install_done is succeeded retries: 5 delay: 10 when: (source_install is not defined or source_install == false) and not enable_venv|bool @@ -53,7 +53,7 @@ - name: "Install from {{ sourcedir }} using pip" command: pip3 install {{ sourcedir }} {{ extra_args | default('') }} register: pip_package_install_done - until: pip_package_install_done|succeeded + until: pip_package_install_done is succeeded retries: 5 delay: 10 when: source_install is defined and (source_install | bool == true) diff --git a/playbooks/roles/bifrost-keystone-install/tasks/pip_install.yml b/playbooks/roles/bifrost-keystone-install/tasks/pip_install.yml index c4e184d82..12f19aadb 100644 --- a/playbooks/roles/bifrost-keystone-install/tasks/pip_install.yml +++ b/playbooks/roles/bifrost-keystone-install/tasks/pip_install.yml @@ -26,7 +26,7 @@ virtualenv_command: "{{ venv_command | default(omit) }}" extra_args: "{{ extra_args | default(omit) }}" register: pip_package_install_done - until: pip_package_install_done|succeeded + until: pip_package_install_done is succeeded retries: 5 delay: 10 when: (source_install is not defined or source_install == false) and enable_venv|bool @@ -39,7 +39,7 @@ extra_args: "{{ extra_args | default(omit) }}" requirements: "{{ requirements_file | default(omit) }}" register: pip_package_install_done - until: pip_package_install_done|succeeded + until: pip_package_install_done is succeeded retries: 5 delay: 10 when: (source_install is not defined or source_install == false) and not enable_venv|bool @@ -50,7 +50,7 @@ - name: "Install from {{ sourcedir }} using pip" command: pip3 install --upgrade {{ sourcedir }} {{ extra_args | default('') }} register: pip_package_install_done - until: pip_package_install_done|succeeded + until: pip_package_install_done is succeeded retries: 5 delay: 10 when: source_install is defined and (source_install | bool == true)