ansible ver=2.0.2

When I'm registering the ec2 var isn't results suppose to be automatically 
defined as the results of what was registered in the variable.  I'm getting 
this when trying to debug the ec2.results var:
TASK [debug ec2 var] 
***********************************************************
Monday 23 May 2016  11:14:18 -0500 (0:00:38.587)       0:00:43.306 
************
ok: [aaa-frs-ans-test1] => {
    "ec2.results": "VARIABLE IS NOT DEFINED!"
}
ok: [aaa-frs-ans-test2] => {
    "ec2.results": "VARIABLE IS NOT DEFINED!"
}
Here's my creation task:
- hosts: ec2_instances
  connection: local
  gather_facts: true
  tasks:
    - name: Launch Instance
      ec2:
        group_id: "{{ hostvars[inventory_hostname].group_id }}"
        instance_type: 't2.micro'
        image: "{{ hostvars[inventory_hostname].image }}"
        wait: true
        region: 'us-east-1'
        keypair: 'QA_KEYPAIR'
        vpc_subnet_id: "{{ subnet }}"
        instance_tags: "{{ hostvars[inventory_hostname].tags }}"
      register: ec2

They launch fine and if I debug ec2.instances I get all the info from that 
variable.  Also when I debug just ec2 I get all the info as well.  I did 
see though that when I debug just ec2 there isn't a .results section but 
again I thought that was a default var.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/37d5b619-c1e8-4e4d-840e-aa46bf5e6be2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to