mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-11 16:44:22 -07:00
parent
e9d202f944
commit
5c029abac1
2 changed files with 16 additions and 0 deletions
|
@ -40,6 +40,10 @@
|
||||||
vars:
|
vars:
|
||||||
with_alternatives: False
|
with_alternatives: False
|
||||||
mode: auto
|
mode: auto
|
||||||
|
|
||||||
|
# Test that path is checked: alternatives must fail when path is nonexistent
|
||||||
|
- import_tasks: path_is_checked.yml
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- include_tasks: remove_links.yml
|
- include_tasks: remove_links.yml
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
- name: Try with nonexistent path
|
||||||
|
alternatives:
|
||||||
|
name: dummy
|
||||||
|
path: '/non/existent/path/there'
|
||||||
|
link: '/usr/bin/dummy'
|
||||||
|
ignore_errors: True
|
||||||
|
register: alternative
|
||||||
|
|
||||||
|
- name: Check previous task failed
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- 'alternative|failed'
|
Loading…
Add table
Add a link
Reference in a new issue