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

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…] **********************************************
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?

pull request sent
https://github.com/ansible/ansible/pull/8353

Yep, this is merged in now, thank you!