diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..10da9c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +inventory.ini diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..8376ef3 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,5 @@ +[defaults] +interpreter_python = auto_silent +inventory = inventory.ini +remote_user = root +nocows = True diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..641b99a --- /dev/null +++ b/deploy.sh @@ -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}"