# Task/role separation when provisioning with Docker

**URL:** <https://forum.ansible.com/t/task-role-separation-when-provisioning-with-docker/17212>\
**Category:** Ansible Project\
**Created:** [January 7, 2015, 10:52pm UTC](https://forum.ansible.com/t/task-role-separation-when-provisioning-with-docker/17212 "2015-01-07T22:52:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary\_Malouf](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@Gary\_Malouf](https://forum.ansible.com/u/Gary_Malouf)\
**Post date:** [January 7, 2015, 10:52pm UTC](https://forum.ansible.com/t/task-role-separation-when-provisioning-with-docker/17212/1 "2015-01-07T22:52:42Z")

</div>

I want to get an idea what the recommended way of organizing your files would be around doing the following:

1. Provision N EC2 instances of a specific size with appropriate AMI (CentOS + Docker)
2. Create container on each instance running Image A
3. Create container on each instance running Image B
4. Provision ELBs to provide HTTP access to the services

Specifically, I’m wondering what role people would put the EC2 instance creation and ELB provisioning under. I currently have roles for deploying Image A and Image B, but the tasks for setting up the ELBs and EC2 instances respectively are just sitting in my playbook.

My initial temptation is to create a variablized EC2 instance provisioning role, but all it’s doing is putting a thin wrapper over the EC2 module.
