# Auto loading ansible playbook on firstboot

**URL:** <https://forum.ansible.com/t/auto-loading-ansible-playbook-on-firstboot/18669>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [July 3, 2015, 12:15pm UTC](https://forum.ansible.com/t/auto-loading-ansible-playbook-on-firstboot/18669 "2015-07-03T12:15:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Mancuso](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@John\_Mancuso](https://forum.ansible.com/u/John_Mancuso)\
**Post date:** [July 3, 2015, 12:15pm UTC](https://forum.ansible.com/t/auto-loading-ansible-playbook-on-firstboot/18669/1 "2015-07-03T12:15:57Z")

</div>

So I have a master ansible server which will loads different types of servers- typical dbserver, webserver etc. Let’s say (via golden img) I am provisioning new client machines/VMs, could be via cobbler, aws, etc…

How can I automatically run the ansible config initiated by the client (like firstboot) so it is completely hands off unattended install/setup? FYI my golden img contains the master ssh key so that’s already setup by default.

-John

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 3, 2015, 6:01pm UTC](https://forum.ansible.com/t/auto-loading-ansible-playbook-on-firstboot/18669/2 "2015-07-03T18:01:45Z")

</div>

several ways:

- get tower and have the machine do a web callback on boot

- setup a git repo and have the machines use ansible-pull

there are many other ways but all involve in a general fashion that  
you setup a trigger based executor for ansible-playbook and find a way  
to get the machine to hit that trigger on boot.

---

<div class="post-metadata">

**Author:** ![John\_Mancuso](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@John\_Mancuso](https://forum.ansible.com/u/John_Mancuso)\
**Post date:** [July 3, 2015, 7:51pm UTC](https://forum.ansible.com/t/auto-loading-ansible-playbook-on-firstboot/18669/3 "2015-07-03T19:51:53Z")

</div>

Got it thx!

Good article here: [http://www.ansible.com/blog/autoscaling-infrastructures](http://www.ansible.com/blog/autoscaling-infrastructures)

-John
