Add scripts for managing testing virtual machines

This commit is contained in:
Wojciech Kozlowski 2022-12-28 14:24:23 +01:00
parent 8c7972fb35
commit a011ff0419
4 changed files with 20 additions and 0 deletions

View File

@ -46,6 +46,11 @@ To run the `main.yml` playbook on production hosts:
ansible-playbook main.yml -i testing
```
### Testing virtual machines
Scripts for starting, stopping, and reverting the testing virtual machines are located in
`scripts/testing`.
### Playbooks
The Ansible Edda playbook is composed of smaller [`playbooks`](playbooks). To run a single playbook,

5
scripts/testing/revert.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
virsh --connect=qemu:///system snapshot-revert heimdall-virt 00-hostname
virsh --connect=qemu:///system snapshot-revert valkyrie-virt 00-hostname
virsh --connect=qemu:///system snapshot-revert yggdrasil-virt 01-hpool

5
scripts/testing/start.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
virsh --connect=qemu:///system start heimdall-virt
virsh --connect=qemu:///system start valkyrie-virt
virsh --connect=qemu:///system start yggdrasil-virt

5
scripts/testing/stop.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
virsh --connect=qemu:///system shutdown heimdall-virt
virsh --connect=qemu:///system shutdown valkyrie-virt
virsh --connect=qemu:///system shutdown yggdrasil-virt