Skip to content

Instantly share code, notes, and snippets.

@jdauphant
Created April 7, 2014 16:42
Show Gist options
  • Save jdauphant/10023858 to your computer and use it in GitHub Desktop.
Save jdauphant/10023858 to your computer and use it in GitHub Desktop.
production/
ansible_hosts # inventory file for production servers
group_vars/
group1 # here we assign variables to particular groups for production
group2 # ""
host_vars/
hostname1 # if production systems need specific variables, put them here
hostname2 # ""
files/
staging/
ansible_hosts # inventory file for stage environment
group_vars/
host_vars/
files/
group_vars/
group1 # here we assign variables to particular groups
group2 # ""
host_vars/
hostname1 # if systems need specific variables, put them here
hostname2 # ""
files/
file1
site.yml # master playbook
webservers.yml # playbook for webserver tier
dbservers.yml # playbook for dbserver tier
roles/
ansible-playbook -i production/ansible_hosts site.yml
ansible-playbook -i staging/ansible_hosts site.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment