# Sharing Idea about the Control Machine

**URL:** <https://forum.ansible.com/t/sharing-idea-about-the-control-machine/26418>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [January 5, 2018, 1:20am UTC](https://forum.ansible.com/t/sharing-idea-about-the-control-machine/26418 "2018-01-05T01:20:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jamal\_B](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@Jamal\_B](https://forum.ansible.com/u/Jamal_B)\
**Post date:** [January 5, 2018, 1:20am UTC](https://forum.ansible.com/t/sharing-idea-about-the-control-machine/26418/1 "2018-01-05T01:20:57Z")

</div>

Hello, and thank you for viewing.

I had an issue not to long ago where I wanted to reuse a playbook that I wrote to provision resources in a new AWS account. The wrinkle was that I needed to run the playbook on a different CI server which was not properly setup to be a control machine. The server had Docker installed, but not any of the dependencies required to run a typical Ansible control machine. There were concerns with installing the dependencies on the server in order to use it as a proper control machine.

This restriction gave me the idea of creating a Docker based control machine allowing the reuse of the playbook, as well as newly developed playbooks on the CI server. I searched around a bit to see if there was a way to run a playbook from within a Docker container and found a few things, but nothing which suited my needs. So, I decided to create my own Docker based control machine. The image contains Ansible, and a subset of the dependencies for the modules used in the playbook books (template, lineinfile, ec2, route53, unarchive, etc…) I use frequently.

Ansible is an awesome piece of open source that I use quite often so in an effort to be a good open source citizen, I wanted to give back. I placed the code on Github in the repo below which has releases published to Docker hub. In the repo, there is also a demo setup which can be run locally to demonstrate the use of the control machine against simulated managed machines.

Github repo: [https://github.com/jmal98/ansiblecm](https://github.com/jmal98/ansiblecm)

Please check it out when you get a chance. Hopefully you will find it as useful as I do.

Thank you for your time.
