]>
git.immae.eu Git - github/fretlink/docker-ansible.git/blob - centos7-onbuild/ansible-playbook-wrapper
002158d9ea5b158f429c5021764ad3088e7cc9e9
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"
17 # install Galaxy roles, if any
20 if [ -z "$REQUIREMENTS" ]; then
21 REQUIREMENTS
=requirements.yml
24 if [ -f "$REQUIREMENTS" ]; then
25 ansible
-galaxy install -r $REQUIREMENTS
33 if [ -z "$PLAYBOOK" ]; then
38 if [ -z "$INVENTORY" ]; then
39 exec ansible
-playbook \
44 exec ansible
-playbook \
45 -i $INVENTORY $PLAYBOOK \