23 lines
573 B
Bash
Executable file
23 lines
573 B
Bash
Executable file
#!/usr/bin/sh
|
|
|
|
set -x
|
|
|
|
workdir="$(pwd)"
|
|
base="$(realpath $(dirname "$0"))"
|
|
|
|
export ANSIBLE_CACHE_PLUGIN=jsonfile
|
|
export ANSIBLE_CONFIG=$base/ansible.cfg
|
|
#export ANSIBLE_DEBUG=1
|
|
export ANSIBLE_LOG_PATH=ansible_run.log
|
|
|
|
rm $base/vm_files
|
|
ln -s $workdir $base/vm_files
|
|
|
|
ansible-playbook $base/workstation.yaml \
|
|
-v \
|
|
--ask-become-pass \
|
|
-i "inventory.yaml" \
|
|
--ssh-extra-args "-o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22 -i ./master_sshkey" \
|
|
--extra-vars "@$workdir/vars.yaml" \
|
|
"$@"
|
|
|