diff --git a/bootstrap.yml b/bootstrap.yml new file mode 100644 index 0000000..00b6679 --- /dev/null +++ b/bootstrap.yml @@ -0,0 +1,33 @@ +--- + +- hosts: "localhost" + tasks: + - name: "Install Debian 13 Minimal template" + ansible.builtin.command: "qvm-template install debian-13-minimal" # fedora-43-minimal does not currently work as a management VM + + - name: "Create debian-13-mgmt-template" + qubesos: + guest: "debian-13-mgmt-template" + label: black + state: present + template: debian-13-minimal + properties: + netvm: "sys-firewall" + vmtype: "TemplateVM" + + - name: "Apt update" + ansible.builtin.command: "qvm-run -u root debian-13-mgmt-template 'apt update'" + + - name: "Install qubes-ansible-vm and qubes-core-vm" + ansible.builtin.command: "qvm-run -u root debian-13-mgmt-template 'apt install -y qubes-ansible-vm && apt install -y qubes-core-admin-client'" + + - name: "Increase ansible verbosity on the management VM" + ansible.builtin.command: "qvm-run -u root debian-13-mgmt-template 'echo ANSIBLE_LOG_VERBOSITY=debug >> /etc/environment'" + + - name: "Shutdown debian-13-mgmt-template" + qubesos: + guest: "debian-13-mgmt-template" + state: "destroyed" + + - name: "Set debian-13-mgmt-template to default-mgmt-dvm" + ansible.builtin.command: "qvm-prefs default-mgmt-dvm --set template debian-13-mgmt-template"