From 7bb88aaa661dc6756e862562c47368de11657f44 Mon Sep 17 00:00:00 2001 From: Georg Date: Wed, 5 Jan 2022 23:59:13 +0100 Subject: Init Ansible NetBox DHCP POC deployment Signed-off-by: Georg --- ansible/deployment_poc/templates/dhcpd.conf.j2 | 5 + .../templates/libvirt-storage-template.xml.j2 | 16 ++ .../templates/libvirt-template.xml.j2 | 174 +++++++++++++++++++++ 3 files changed, 195 insertions(+) create mode 100644 ansible/deployment_poc/templates/dhcpd.conf.j2 create mode 100644 ansible/deployment_poc/templates/libvirt-storage-template.xml.j2 create mode 100644 ansible/deployment_poc/templates/libvirt-template.xml.j2 (limited to 'ansible/deployment_poc/templates') diff --git a/ansible/deployment_poc/templates/dhcpd.conf.j2 b/ansible/deployment_poc/templates/dhcpd.conf.j2 new file mode 100644 index 0000000..5309ae4 --- /dev/null +++ b/ansible/deployment_poc/templates/dhcpd.conf.j2 @@ -0,0 +1,5 @@ +host {{ vm_name }} { + hardware ethernet {{ mac_address }}; + fixed-address {{ ip_address }}; + filename "replace-with-bootfile"; +} diff --git a/ansible/deployment_poc/templates/libvirt-storage-template.xml.j2 b/ansible/deployment_poc/templates/libvirt-storage-template.xml.j2 new file mode 100644 index 0000000..9ce3ff1 --- /dev/null +++ b/ansible/deployment_poc/templates/libvirt-storage-template.xml.j2 @@ -0,0 +1,16 @@ + + {{ inventory_hostname }}_root_disk.qcow2 + + + {{ disk }} + + {{ storage.name }} + + + 0660 + 107 + 107 + + + + diff --git a/ansible/deployment_poc/templates/libvirt-template.xml.j2 b/ansible/deployment_poc/templates/libvirt-template.xml.j2 new file mode 100644 index 0000000..8c4170d --- /dev/null +++ b/ansible/deployment_poc/templates/libvirt-template.xml.j2 @@ -0,0 +1,174 @@ + + {{ inventory_hostname }} + + + + + {{ memory }} + {{ memory }} + {{ vcpus }} + + /machine + + + hvm + /usr/share/qemu/ovmf-x86_64-code.bin + /var/lib/libvirt/qemu/nvram/{{ inventory_hostname }}_VARS.fd + + + + + + + + + Broadwell-IBRS + Intel + + + + + + + + + + + + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + +
+ + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + /dev/urandom + +
+ + + + -- cgit v1.2.3