ansible/host_vars: Add installation metadata for the metrics VM
authornicoo <nicoo@realraum.at>
Thu, 24 Jan 2019 19:08:30 +0000 (20:08 +0100)
committernicoo <nicoo@realraum.at>
Thu, 24 Jan 2019 19:08:30 +0000 (20:08 +0100)
ansible/host_vars/alfred/main.yml
ansible/host_vars/metrics/main.yml

index ab6ad85..ed73d0c 100644 (file)
@@ -9,4 +9,5 @@ vm_host:
     gateway: "{{ net.mgmt.gw }}"
     nameservers: "{{ net.mgmt.dns }}"
     indices:
+      metrics: 74
       testvm: 99
index 31b6b26..c1d5edf 100644 (file)
@@ -1,2 +1,35 @@
 ---
 localconfig_ssh_config_user: root
+
+vm_host: alfred
+
+install:
+  host: "{{ vm_host }}"
+  mem: 1024
+  numcpu: 2
+  disks:
+    primary: /dev/vda
+    virtio:
+      vda:
+        vg: "{{ vm_host }}"
+        lv: "{{ inventory_hostname }}"
+        size: 10g
+      vdb:
+        vg: "{{ vm_host }}"
+        lv: "{{ inventory_hostname }}-data"
+
+  interfaces:
+  - bridge: "{{ hostvars[vm_host].vm_host.network.interface }}"
+    name: mgmt0
+  autostart: True
+
+network:
+  nameservers: "{{ hostvars[vm_host].vm_host.network.nameservers }}"
+  domain: realraum.at
+  systemd_link:
+    interfaces: "{{ install.interfaces }}"
+  primary:
+    interface: mgmt0
+    ip: "{{ (hostvars[vm_host].vm_host.network.ip+'/'+hostvars[vm_host].vm_host.network.mask) | ipaddr(hostvars[vm_host].vm_host.network.indices[inventory_hostname]) | ipaddr('address') }}"
+    mask: "{{ hostvars[vm_host].vm_host.network.mask }}"
+    gateway: "{{ hostvars[vm_host].vm_host.network.gateway | default(hostvars[vm_host].vm_host.network.ip) }}"