]>
git.immae.eu Git - github/fretlink/docker-ansible.git/blob - centos7-onbuild/ansible-playbook-wrapper
0ba45e6d33a5c8ac18d815a70807b630ece38444
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 ansible
-galaxy install -r $REQUIREMENTS
34 if [ -z "$PLAYBOOK" ]; then
39 if [ -z "$INVENTORY" ]; then
40 exec ansible
-playbook \
45 exec ansible
-playbook \
46 -i $INVENTORY $PLAYBOOK \