ℹ️
This module is part of a larger project on setting up Game of Active Directory (GOAD) on Proxmox alongside our existing lab infrastructure. Click here to be taken back to the project landing page.
Previous Step
Objectives for this Step
- Install the Ansible requirements
- Apply the Ansible playbook against the lab hosts
Configure and Run Ansible
Install Ansible Requirements
cd /root/GOAD/ansible/
ansible-galaxy install -r requirements.yml
Run the Playbook
cd /root/GOAD/ansible
export ANSIBLE_COMMAND="ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/proxmox/inventory"
../scripts/provisionning.sh
Take Snapshots
⚠️
This step needs to be done on your Proxmox node
vms=("DC01" "DC02" "DC03" "SRV02" "SRV03")
COMMENT="after ansible"
# Loop over the array
for vm in "${vms[@]}"
do
echo "[+] Create snapshot for $vm"
id=$(qm list | grep $vm | awk '{print $1}')
echo "[+] VM id is : $id"
qm snapshot "$id" 'snapshot-'$(date '+%Y-%m-%d--%H-%M') --vmstate 1 --description "$COMMENT"
done