ara: check for return code instead of succeed
In Ansible-2.4, the |succeed behavior changed and always return True when task uses 'failed_when: false'. Also uses "type -p" instead of "which" that is used in other roles. Change-Id: Iddcff07a40dc6c36a1a1c2101a7822697cdbbc34
This commit is contained in:
parent
8a6b1215c3
commit
834358541d
@ -12,13 +12,13 @@
|
|||||||
- ara_save_database | bool
|
- ara_save_database | bool
|
||||||
|
|
||||||
- name: Check for ARA install
|
- name: Check for ARA install
|
||||||
command: which ara
|
command: bash -c "type -p ara"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
register: ara_command_type
|
register: ara_command_type
|
||||||
when: ara_db_stat.stat.exists
|
when: ara_db_stat.stat.exists
|
||||||
|
|
||||||
- when:
|
- when:
|
||||||
- ara_command_type | succeeded
|
- ara_command_type.rc == 0
|
||||||
- not ara_command_type | skipped
|
- not ara_command_type | skipped
|
||||||
block:
|
block:
|
||||||
# Always generate (true), never (false) or only on failure ('failure')
|
# Always generate (true), never (false) or only on failure ('failure')
|
||||||
|
Loading…
Reference in New Issue
Block a user