1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

merge_variables: Fix example section (#6250)

This commit is contained in:
Roy Lenferink 2023-03-26 15:42:48 +02:00 committed by GitHub
parent f52dd194f9
commit 05824a0754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ testb__test_dict:
# Merge variables that end with '__test_dict' and store the result in a variable 'example_a'
example_a: "{{ lookup('community.general.merge_variables', '__test_dict') }}"
example_a: "{{ lookup('community.general.merge_variables', '__test_dict', pattern_type='suffix') }}"
# The variable example_a now contains:
# ports:
@ -93,9 +93,9 @@ example_a: "{{ lookup('community.general.merge_variables', '__test_dict') }}"
# - 3
# Merge variables that end with '__test_list', starting with an initial value and store the result
# in a variable 'example_b'
example_b: "{{ lookup('community.general.merge_variables', '__test_list', initial_value=test_init_list) }}"
# Merge variables that match the '^.+__test_list$' regular expression, starting with an initial value and store the
# result in a variable 'example_b'
example_b: "{{ lookup('community.general.merge_variables', '^.+__test_list$', initial_value=test_init_list) }}"
# The variable example_b now contains:
# - "list init item 1"