added ansible configuration and deployment script

This commit is contained in:
Bryan Joshua Pedini 2022-04-06 11:58:35 +02:00
parent ced9950477
commit dd092102fb
3 changed files with 20 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
inventory.ini

5
ansible.cfg Normal file
View File

@ -0,0 +1,5 @@
[defaults]
interpreter_python = auto_silent
inventory = inventory.ini
remote_user = root
nocows = True

14
deploy.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
PLAYBOOK=$1
LIMIT=""
shift
for SERVICE in $@; do
LIMIT="${LIMIT} --limit $1"
shift
done
LIMIT=$(echo "${LIMIT}" | sed 's/^ //')
ansible-playbook "${LIMIT}" "${PLAYBOOK}"