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:
parent
b457191d14
commit
e2058a6b75
@ -16,4 +16,4 @@
|
|||||||
- name: Define bindep_command fact
|
- name: Define bindep_command fact
|
||||||
set_fact:
|
set_fact:
|
||||||
bindep_command: "{{ bindep_command_type.stdout }}"
|
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
|
||||||
|
@ -17,17 +17,17 @@
|
|||||||
- name: Define bindep_file fact
|
- name: Define bindep_file fact
|
||||||
set_fact:
|
set_fact:
|
||||||
bindep_file: "{{ bindep_other_file_stat.stat.path }}"
|
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
|
- name: Look for bindep fallback file
|
||||||
stat:
|
stat:
|
||||||
path: "{{ bindep_fallback }}"
|
path: "{{ bindep_fallback }}"
|
||||||
register: bindep_fallback_file_stat
|
register: bindep_fallback_file_stat
|
||||||
when: bindep_fallback is defined
|
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
|
and not bindep_other_file_stat.stat.exists
|
||||||
|
|
||||||
- name: Define bindep_file fact
|
- name: Define bindep_file fact
|
||||||
set_fact:
|
set_fact:
|
||||||
bindep_file: "{{ bindep_fallback_file_stat.stat.path }}"
|
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
|
||||||
|
@ -19,4 +19,4 @@
|
|||||||
- name: Fail if we cannot install all packages
|
- name: Fail if we cannot install all packages
|
||||||
fail:
|
fail:
|
||||||
msg: "bindep failed to install from {{ bindep_file}} - {{ bindep_final_check.stdout }}"
|
msg: "bindep failed to install from {{ bindep_file}} - {{ bindep_final_check.stdout }}"
|
||||||
when: bindep_final_check|failed
|
when: bindep_final_check is failed
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
msg: "Variable constraints_file is set but file does not exist."
|
msg: "Variable constraints_file is set but file does not exist."
|
||||||
when:
|
when:
|
||||||
- constraints_file is defined
|
- 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
|
- name: Record file location
|
||||||
set_fact:
|
set_fact:
|
||||||
upper_constraints: "-c {{ constraints_file }}"
|
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
|
- name: Install babel
|
||||||
pip:
|
pip:
|
||||||
|
@ -15,4 +15,4 @@
|
|||||||
- name: Record file location
|
- name: Record file location
|
||||||
set_fact:
|
set_fact:
|
||||||
upper_constraints: "-c {{ constraints_file|realpath }}"
|
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
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
failed_when:
|
failed_when:
|
||||||
- error_on_failure is defined
|
- error_on_failure is defined
|
||||||
- error_on_failure
|
- error_on_failure
|
||||||
- requirements_install|failed
|
- requirements_install is failed
|
||||||
|
|
||||||
# Build an sdist. This is needed for pbr projects that may expect
|
# Build an sdist. This is needed for pbr projects that may expect
|
||||||
# the ChangeLog to have been generated.
|
# the ChangeLog to have been generated.
|
||||||
@ -54,7 +54,7 @@
|
|||||||
failed_when:
|
failed_when:
|
||||||
- error_on_failure is defined
|
- error_on_failure is defined
|
||||||
- error_on_failure
|
- error_on_failure
|
||||||
- sdist_results|failed
|
- sdist_results is failed
|
||||||
|
|
||||||
# Try installing current repo in case it needs to be available for
|
# Try installing current repo in case it needs to be available for
|
||||||
# example for version number calculation. Ignore any failures here.
|
# example for version number calculation. Ignore any failures here.
|
||||||
@ -71,4 +71,4 @@
|
|||||||
failed_when:
|
failed_when:
|
||||||
- error_on_failure is defined
|
- error_on_failure is defined
|
||||||
- error_on_failure
|
- error_on_failure
|
||||||
- install_package_results|failed
|
- install_package_results is failed
|
||||||
|
Loading…
Reference in New Issue
Block a user