+ latest extensions - deployed nginx, apache, php 74 & 81, nvm, automatic databases import and phpmyadmin with nginx basic auth
+ dhcp dnsmasq server playbook for create inner server network #861m7vaer Шаблон операционной системы на Debian 10
This commit is contained in:
@ -3,6 +3,13 @@ SERVER=$1
|
||||
LXC_HOST=$2
|
||||
PLAYBOOK=$3
|
||||
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
-f|--force) force=1; shift ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
usage() {
|
||||
echo "Usage: run-lxc-playbook.sh server lxc_host playbook"
|
||||
echo "server - main proxmox server IP address and lxc_host that the name of lxc container"
|
||||
@ -39,10 +46,14 @@ ansible-playbook -e "lxc_host=$LXC_HOST" --ssh-common-args="-o ProxyCommand='ssh
|
||||
EOF
|
||||
)
|
||||
|
||||
printf 'Launch ansible playbook:\n%s\n' "$COMMAND"
|
||||
read -p "Are you sure? " -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
/bin/bash -c "$COMMAND"
|
||||
if [[ -z "$force" ]]; then
|
||||
printf 'Launch ansible playbook:\n%s\n' "$COMMAND"
|
||||
read -p "Are you sure? " -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
/bin/bash -c "$COMMAND"
|
||||
fi
|
||||
else
|
||||
/bin/bash -c "$COMMAND"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user