mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
When value does not exist, return default value instead of stopping ansible with an exception.
This commit is contained in:
@@ -26,4 +26,5 @@
|
||||
with_items: [ 'value_section', 'other_section' ]
|
||||
- name: "Reading unknown value"
|
||||
set_fact:
|
||||
value2_section2: "{{lookup('ini', 'value2 section=section1 file=lookup.ini')}}"
|
||||
unknown: "{{lookup('ini', 'value2 default=unknown section=section1 file=lookup.ini')}}"
|
||||
- debug: var=unknown
|
||||
|
||||
Reference in New Issue
Block a user