Last active
July 24, 2016 01:29
-
-
Save aaronmehar/2308c1d3878be7fffa753697a33d61f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build a host file | |
http://docs.ansible.com/ansible/intro_inventory.html | |
Create a play: | |
---------------------------------------------- | |
- name: Transfer and execute a script. <--- name of the play | |
hosts: all <--- which servesr to run this one, in this case, all of them | |
tasks: <--- start to define the jobs to do | |
- name: Copy and Execute the script <--- Name the first task | |
script: /home/user/userScript.sh <--- http://docs.ansible.com/ansible/script_module.html | |
---------------------------------------------- | |
and run it; | |
ansible-playbook -i hosts site.yml <-- Run the play 'site.yml' and use the file called hosts which lists the servers | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment