2024-05-22 17:35:11 +02:00
|
|
|
#!/usr/bin/sh
|
|
|
|
|
|
2024-07-03 18:03:08 +02:00
|
|
|
set -x
|
|
|
|
|
|
2024-05-22 17:35:11 +02:00
|
|
|
workdir="$(pwd)"
|
|
|
|
|
base="$(realpath $(dirname "$0"))"
|
|
|
|
|
|
|
|
|
|
export ANSIBLE_CACHE_PLUGIN=jsonfile
|
|
|
|
|
export ANSIBLE_CONFIG=$base/ansible.cfg
|
2024-05-26 22:17:13 +02:00
|
|
|
#export ANSIBLE_DEBUG=1
|
|
|
|
|
export ANSIBLE_LOG_PATH=ansible_run.log
|
2024-05-22 17:35:11 +02:00
|
|
|
|
2024-05-26 22:17:13 +02:00
|
|
|
rm $base/vm_files
|
|
|
|
|
ln -s $workdir $base/vm_files
|
|
|
|
|
|
2024-05-22 17:35:11 +02:00
|
|
|
ansible-playbook $base/workstation.yaml \
|
2024-05-26 22:17:13 +02:00
|
|
|
-v \
|
2024-06-10 23:30:00 +02:00
|
|
|
--ask-become-pass \
|
2024-06-06 11:31:30 +02:00
|
|
|
-i "inventory.yaml" \
|
2024-05-27 23:19:04 +02:00
|
|
|
--ssh-extra-args "-o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 22 -i ./master_sshkey" \
|
2024-05-26 22:17:13 +02:00
|
|
|
--extra-vars "@$workdir/vars.yaml" \
|
2024-07-03 18:03:08 +02:00
|
|
|
"$@"
|
2024-05-26 22:17:13 +02:00
|
|
|
|