]>
git.immae.eu Git - github/fretlink/docker-ansible.git/blob - 1.9-debian8-onbuild/ansible-playbook-wrapper
afe4d97d9aa73298543855d7b154eac25345c3f7
3 # Simple wrapper for executing ansible-galaxy and ansible-playbook
4 # with local connection.
7 # ansible-playbook-wrapper [other ansible-playbook arguments]
9 # ENVIRONMENT VARIABLES:
11 # - REQUIREMENTS: requirements filename; default = "requirements.yml"
12 # - PLAYBOOK: playbook filename; default = "playbook.yml"
13 # - INVENTORY: inventory filename; default = "/etc/ansible/hosts"
18 # install Galaxy roles, if any
21 if [ -z "$REQUIREMENTS" ]; then
22 REQUIREMENTS
=requirements.yml
25 if [ -f "$REQUIREMENTS" ]; then
26 apt
-get install -y git
27 ansible
-galaxy install -r $REQUIREMENTS
35 if [ -z "$PLAYBOOK" ]; then
40 if [ -z "$INVENTORY" ]; then
41 exec ansible
-playbook \
46 exec ansible
-playbook \
47 -i $INVENTORY $PLAYBOOK \