|
@ -1,7 +1,7 @@ |
|
|
#!/bin/bash |
|
|
#!/bin/bash |
|
|
SERVER=$1 |
|
|
SERVER=$1 |
|
|
PLAYBOOK=$2 |
|
|
PLAYBOOK=$2 |
|
|
SITE_NAME=$3 |
|
|
|
|
|
|
|
|
USER=$3 |
|
|
|
|
|
|
|
|
while [[ "$#" -gt 0 ]]; do |
|
|
while [[ "$#" -gt 0 ]]; do |
|
|
case $1 in |
|
|
case $1 in |
|
@ -28,8 +28,12 @@ if [[ -z "$PLAYBOOK" ]]; then |
|
|
exit 1 |
|
|
exit 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if [[ -z "$USER" ]]; then |
|
|
|
|
|
USER=root |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
COMMAND=$(cat <<EOF |
|
|
COMMAND=$(cat <<EOF |
|
|
ansible-playbook -e "lxc_host=${SERVER} -e runner=normal" |
|
|
|
|
|
|
|
|
ansible-playbook -e "lxc_host=${SERVER}" -e "runner=normal" -e "ansible_user=${USER}" |
|
|
EOF |
|
|
EOF |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|