2024-05-22 15:35:11 +00:00
|
|
|
#!/usr/bin/sh
|
|
|
|
|
|
|
|
workdir="$(pwd)"
|
|
|
|
base="$(realpath $(dirname "$0"))"
|
|
|
|
|
|
|
|
export ANSIBLE_CACHE_PLUGIN=jsonfile
|
|
|
|
export ANSIBLE_CONFIG=$base/ansible.cfg
|
2024-05-26 20:17:13 +00:00
|
|
|
#export ANSIBLE_DEBUG=1
|
|
|
|
export ANSIBLE_LOG_PATH=ansible_run.log
|
2024-05-22 15:35:11 +00:00
|
|
|
|
|
|
|
cd $base
|
2024-06-10 21:30:00 +00:00
|
|
|
cat arch_packages.yaml | python3 parse_arch_packages.py > arch_packages.json
|
|
|
|
cd $workdir
|
|
|
|
|
|
|
|
cd $base
|
|
|
|
cat pip_packages.yaml | python3 parse_arch_packages.py > pip_packages.json
|
2024-05-22 15:35:11 +00:00
|
|
|
cd $workdir
|
|
|
|
|
2024-05-26 20:17:13 +00:00
|
|
|
rm $base/vm_files
|
|
|
|
ln -s $workdir $base/vm_files
|
|
|
|
|
2024-05-22 15:35:11 +00:00
|
|
|
ansible-playbook $base/workstation.yaml \
|
2024-05-26 20:17:13 +00:00
|
|
|
-v \
|
2024-06-10 21:30:00 +00:00
|
|
|
--ask-become-pass \
|
2024-05-22 15:35:11 +00:00
|
|
|
-u "mbess" \
|
2024-06-06 09:31:30 +00:00
|
|
|
-i "inventory.yaml" \
|
2024-05-27 21:19:04 +00: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 20:17:13 +00:00
|
|
|
--extra-vars "@$workdir/vars.yaml" \
|
2024-06-10 21:30:00 +00:00
|
|
|
--start-at-task "Install pip packages"
|
2024-05-26 20:17:13 +00:00
|
|
|
|