Ansible modules normally return a data structure that can be registered into a variable, or seen directly when output by the ansible program
and
Ansible modules normally return a data structure that can be registered into a variable, or seen directly when output by the ansible program
However, the document on aws_ec2 module
- Doesn't document return values
- Has this example, which seems like it actually has some specific return values
# Stripped version
# Launch instances, runs some tasks
# and then terminate them
- name: Create a sandbox instance
... # hosts, vars...
tasks:
- name: Launch instance
ec2:
... # ec2 module specs
register: ec2 #This seems to be one of the specific return structure by this module
- name: Wait for SSH to come up
... # some module
with_items: "{{ ec2.instances }}" # This is where the registered return value is used
Question: How to see all possible return values of a module, even without documentation