# Very simple, but very usefull path to ec2\_remote\_facts

**URL:** <https://forum.ansible.com/t/very-simple-but-very-usefull-path-to-ec2-remote-facts/22549>\
**Category:** Ansible Project\
**Created:** [September 15, 2016, 12:30am UTC](https://forum.ansible.com/t/very-simple-but-very-usefull-path-to-ec2-remote-facts/22549 "2016-09-15T00:30:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleg\_Tsarev](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@Oleg\_Tsarev](https://forum.ansible.com/u/Oleg_Tsarev)\
**Post date:** [September 15, 2016, 12:30am UTC](https://forum.ansible.com/t/very-simple-but-very-usefull-path-to-ec2-remote-facts/22549/1 "2016-09-15T00:30:02Z")

</div>

Hi everybody,

It would be very usefull to receive public\_ip from ec2\_remote\_facts.py  
I wrote simple patch for that.  
Probably we should include it to the ansible 2.2?

With best regards, Oleg

```auto
--- a/venv/lib/python2.7/site-packages/ansible/modules/extras/cloud/amazon/ec2_remote_facts.py 2016-07-28 19:32:31.000000000 +0200
+++ b/venv/lib/python2.7/site-packages/ansible/modules/extras/cloud/amazon/ec2_remote_facts.py 2016-09-15 02:13:30.000000000 +0200
@@ -112,6 +112,7 @@
                     'hypervisor': instance.hypervisor,
                     'region': instance.region.name,
                     'persistent': instance.persistent,
+ 'ip_address': instance.ip_address,
                     'private_ip_address': instance.private_ip_address,
                     'state': instance._state.name,
                     'vpc_id': instance.vpc_id,

```
