[cloud][docs] Add a cloudformation_facts example (#31964)
This commit is contained in:
parent
838c1ba6c7
commit
13807e7ee8
1 changed files with 11 additions and 0 deletions
|
@ -69,6 +69,17 @@ EXAMPLES = '''
|
|||
- debug:
|
||||
msg: "{{ ansible_facts['cloudformation']['my-cloudformation-stack'] }}"
|
||||
|
||||
# Get stack outputs, when you have the stack name available as a fact
|
||||
- set_fact:
|
||||
stack_name: my-awesome-stack
|
||||
|
||||
- cloudformation_facts:
|
||||
stack_name: "{{ stack_name }}"
|
||||
register: my_stack
|
||||
|
||||
- debug:
|
||||
msg: "{{ my_stack.ansible_facts.cloudformation[stack_name].stack_outputs }}"
|
||||
|
||||
# Get all stack information about a stack
|
||||
- cloudformation_facts:
|
||||
stack_name: my-cloudformation-stack
|
||||
|
|
Loading…
Reference in a new issue