Skip to content

Instantly share code, notes, and snippets.

@edgarsandi
Last active May 19, 2017 18:58
Show Gist options
  • Save edgarsandi/bf2870ed2d940b06ca9d56b4b652d5fb to your computer and use it in GitHub Desktop.
Save edgarsandi/bf2870ed2d940b06ca9d56b4b652d5fb to your computer and use it in GitHub Desktop.
tree ansible-deploy/
config/
dev-aws.ansible.cfg
live-aws.ansible.cfg
group_vars/
dev
staging
live
host_vars/
??
inventory/
alice
bob
roles/
before-deploy/
tasks/
main.yml
handlers/
main.yml
templates/
main.yml
files/
file1.txt
file2.sh
vars/
main.yml
defaults/
main.yml
meta/
main.yml
install-package/
tasks/
main.yml
handlers/
main.yml
templates/
main.yml
files/
file1.txt
file2.sh
vars/
main.yml
defaults/
main.yml
meta/
main.yml
... <each deploy group tasks>
vars/
alice.yml
playbooks/
alice.yml
bob.yml
cat playbooks/alice.yml
- name: Alice playbopok
hosts: "{{ host_pattern }}"
vars_files:
- vars/alice.yml
roles:
- role: before-deploy
tags: before-deploy
- role: install-package
tags: install-package
... others
call:
ansible-playbook -i inventory/alice playbooks/alice.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment