# Post-install tasks for EC2 in private subnet

**URL:** <https://forum.ansible.com/t/post-install-tasks-for-ec2-in-private-subnet/24537>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [May 22, 2017, 12:35pm UTC](https://forum.ansible.com/t/post-install-tasks-for-ec2-in-private-subnet/24537 "2017-05-22T12:35:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amedix](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@Amedix](https://forum.ansible.com/u/Amedix)\
**Post date:** [May 22, 2017, 12:35pm UTC](https://forum.ansible.com/t/post-install-tasks-for-ec2-in-private-subnet/24537/1 "2017-05-22T12:35:59Z")

</div>

Hi there,

I have an ansible playbook and its purpose is to provision AWS EC2 instances in a private subnet.

The playbook has two parts, the first one is to create the EC2 instance and works fine, however the second part is the post install tasks.

How can I execute ansible roles against this EC2 instance ? knowing that it’s in a private subnet ?

Thanks in advance
