mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
committed by
Matt Clay
parent
e9d202f944
commit
5c029abac1
@@ -40,6 +40,10 @@
|
||||
vars:
|
||||
with_alternatives: False
|
||||
mode: auto
|
||||
|
||||
# Test that path is checked: alternatives must fail when path is nonexistent
|
||||
- import_tasks: path_is_checked.yml
|
||||
|
||||
always:
|
||||
- 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'
|
||||
Reference in New Issue
Block a user