New & fixed examples for aws_ssm lookup (#58293)

* New & fixed examples for aws_ssm lookup

* Apply suggestions from code review

Co-Authored-By: Sloane Hertel <shertel@redhat.com>

* Clarify example name
pull/58519/head
kfattig 5 years ago committed by Alicia Cozine
parent 23f0ca0acd
commit 756cdebd37

@ -96,9 +96,13 @@ EXAMPLES = '''
- name: return a dictionary of ssm parameters from a hierarchy path with shortened names (param instead of /PATH/to/param)
debug: msg="{{ lookup('aws_ssm', '/PATH/to/params', region='ap-southeast-2', shortnames=true, bypath=true, recursive=true ) }}"
- name: Iterate over a parameter hierarchy
debug: msg='key contains {{item.Name}} with value {{item.Value}} '
loop: '{{ query("aws_ssm", "/TEST/test-list", region="ap-southeast-2", bypath=true) }}'
- name: Iterate over a parameter hierarchy (one iteration per parameter)
debug: msg='Key contains {{ item.key }} , with value {{ item.value }}'
loop: '{{ lookup("aws_ssm", "/demo/", region="ap-southeast-2", bypath=True) | dict2items }}'
- name: Iterate over multiple paths as dictionaries (one iteration per path)
debug: msg='Path contains {{ item }}'
loop: '{{ lookup("aws_ssm", "/demo/", "/demo1/", bypath=True)}}'
'''

Loading…
Cancel
Save