Fix deprecation warning of ansible-2.5

This change fixes this upcoming deprecation warning:

[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using
`result|skipped` instead use `result is skipped`. This feature will be removed
in version 2.9.

Change-Id: Ic0c93f2ea896ead76922694e6150882d8a280daf
This commit is contained in:
Tristan Cacqueray 2018-06-04 00:17:16 +00:00
parent b457191d14
commit e2058a6b75
6 changed files with 11 additions and 11 deletions

View File

@ -16,4 +16,4 @@
- name: Define bindep_command fact
set_fact:
bindep_command: "{{ bindep_command_type.stdout }}"
when: not bindep_command_type|skipped and bindep_command_type.rc == 0
when: not bindep_command_type is skipped and bindep_command_type.rc == 0

View File

@ -17,17 +17,17 @@
- name: Define bindep_file fact
set_fact:
bindep_file: "{{ bindep_other_file_stat.stat.path }}"
when: not bindep_other_file_stat|skipped and bindep_other_file_stat.stat.exists
when: not bindep_other_file_stat is skipped and bindep_other_file_stat.stat.exists
- name: Look for bindep fallback file
stat:
path: "{{ bindep_fallback }}"
register: bindep_fallback_file_stat
when: bindep_fallback is defined
and not bindep_other_file_stat|skipped
and not bindep_other_file_stat is skipped
and not bindep_other_file_stat.stat.exists
- name: Define bindep_file fact
set_fact:
bindep_file: "{{ bindep_fallback_file_stat.stat.path }}"
when: not bindep_fallback_file_stat|skipped and bindep_fallback_file_stat.stat.exists
when: not bindep_fallback_file_stat is skipped and bindep_fallback_file_stat.stat.exists

View File

@ -19,4 +19,4 @@
- name: Fail if we cannot install all packages
fail:
msg: "bindep failed to install from {{ bindep_file}} - {{ bindep_final_check.stdout }}"
when: bindep_final_check|failed
when: bindep_final_check is failed

View File

@ -18,12 +18,12 @@
msg: "Variable constraints_file is set but file does not exist."
when:
- constraints_file is defined
- not stat_results|skipped and not stat_results.stat.exists
- not stat_results is skipped and not stat_results.stat.exists
- name: Record file location
set_fact:
upper_constraints: "-c {{ constraints_file }}"
when: not stat_results|skipped and stat_results.stat.exists
when: not stat_results is skipped and stat_results.stat.exists
- name: Install babel
pip:

View File

@ -15,4 +15,4 @@
- name: Record file location
set_fact:
upper_constraints: "-c {{ constraints_file|realpath }}"
when: not stat_results|skipped and stat_results.stat.exists
when: not stat_results is skipped and stat_results.stat.exists

View File

@ -39,7 +39,7 @@
failed_when:
- error_on_failure is defined
- error_on_failure
- requirements_install|failed
- requirements_install is failed
# Build an sdist. This is needed for pbr projects that may expect
# the ChangeLog to have been generated.
@ -54,7 +54,7 @@
failed_when:
- error_on_failure is defined
- error_on_failure
- sdist_results|failed
- sdist_results is failed
# Try installing current repo in case it needs to be available for
# example for version number calculation. Ignore any failures here.
@ -71,4 +71,4 @@
failed_when:
- error_on_failure is defined
- error_on_failure
- install_package_results|failed
- install_package_results is failed