WIP
This commit is contained in:
21
example/ansible/run_ansible.sh
Executable file
21
example/ansible/run_ansible.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
ANSIBLE_CONFIG=./ansible.cfg
|
||||
export ANSIBLE_CONFIG
|
||||
|
||||
PLAY="main"
|
||||
if [ "$1" == "--play" ]; then
|
||||
shift
|
||||
PLAY="$1"
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ -f "./ansible_local.env" ]; then
|
||||
. ./ansible_local.env
|
||||
fi
|
||||
|
||||
if [ -f "./requirements.yml" ]; then
|
||||
ansible-galaxy install -r requirements.yml
|
||||
fi
|
||||
|
||||
ansible-lint --strict --project-dir . play-${PLAY}.yml && time ansible-playbook play-${PLAY}.yml $*
|
||||
Reference in New Issue
Block a user