# Deploy application on a newly created AWS

**URL:** <https://forum.ansible.com/t/deploy-application-on-a-newly-created-aws/23288>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [December 19, 2016, 7:51pm UTC](https://forum.ansible.com/t/deploy-application-on-a-newly-created-aws/23288 "2016-12-19T19:51:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![farahfa89](https://avatars.discourse-cdn.com/v4/letter/f/4af34b/32.png) [@farahfa89](https://forum.ansible.com/u/farahfa89)\
**Post date:** [December 19, 2016, 7:51pm UTC](https://forum.ansible.com/t/deploy-application-on-a-newly-created-aws/23288/1 "2016-12-19T19:51:42Z")

</div>

I am creating an Ansible playbook that has two roles: one role that creates an AWS instance (from a pre-made AMI which includes Ansible), then another role that deploys Sonatype Nexus into that instance. I’ve tested the roles separately (and locally) to make sure they’re working fine and they work as expected, however, my problem is figuring out how to deploy Nexus into that newly created instance.

Is my approach wrong (having two separate roles for this)? I need some guidance as I’m new to Ansible.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 20, 2016, 11:07pm UTC](https://forum.ansible.com/t/deploy-application-on-a-newly-created-aws/23288/2 "2016-12-20T23:07:28Z")

</div>

You need to make your playbook like this:
