ec2 module, "state: running" doesn't return the public_dns_name, ip etc...

58 views
Skip to first unread message

Damjan Georgievski

unread,
Jul 30, 2014, 8:16:16 AM7/30/14
to ansible...@googlegroups.com
I have this simple task:

    - name: Starting ec2 instance...
      ec2:
         region: 'us-east-1'
         instance_ids: '{{ instance_ids }}'
         state: running
         wait: True
      register: ec2_info

I run ansible-playbook with -vv and the output is:

TASK: [Starting ec2 instance...] **********************************************
<localhost> REMOTE_MODULE ec2 state=running region=us-east-1
changed: [localhost] => {"changed": true, "instance_ids": ["i-xxxxxx"], "instances": [{"ami_launch_index": "0", "architecture": "x86_64", "dns_name": "", "ebs_optimized": false, "hypervisor": "xen", "id": "i-xxxxxx", "image_id": "ami-zzzzzz", "instance_type": "m1.small", "kernel": "aki-919dcaf8", "key_name": "ops", "launch_time": "2014-07-30T11:29:52.000Z", "placement": "us-east-1b", "private_dns_name": "", "private_ip": null, "public_dns_name": "", "public_ip": null, "ramdisk": null, "region": "us-east-1", "root_device_name": "/dev/sda", "root_device_type": "ebs", "state": "stopped", "state_code": 80, "virtualization_type": "paravirtual"}], "tagged_instances": []}

public_dns_name, public_ip, private_dns_name, private_ip are all empty, although I can see them in the AWS console - is this a bug?


--
damjan

Damjan Georgievski

unread,
Jul 30, 2014, 9:20:53 AM7/30/14
to ansible...@googlegroups.com

Michael DeHaan

unread,
Jul 31, 2014, 12:20:41 PM7/31/14
to ansible...@googlegroups.com
Yep, this is merged in now, thank you!


--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e85e6c24-b967-41f9-869a-6a27fc513788%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages