0986fa7d92b311b4cb0e782b91b89cb6145fb6cf
[noc.git] / main.yml
1 ---
2 localconfig_ssh_config_user: root
3
4 vm_host: alfred
5
6 install:
7   host: "{{ vm_host }}"
8   mem: 1024
9   numcpu: 2
10   disks:
11     primary: /dev/vda
12     virtio:
13       vda:
14         vg: "{{ vm_host }}"
15         lv: "{{ inventory_hostname }}"
16         size: 5g
17       vdb:
18         vg: "{{ vm_host }}"
19         lv: "{{ inventory_hostname }}-data"
20         size: 20g
21
22   interfaces:
23   - bridge: "{{ hostvars[vm_host].vm_host.network.interface }}"
24     name: mgmt0
25   - bridge: "br-svc"
26     name: svc0
27   autostart: True
28
29 network:
30   nameservers: "{{ hostvars[vm_host].vm_host.network.nameservers }}"
31   domain: realraum.at
32   systemd_link:
33     interfaces: "{{ install.interfaces }}"
34   primary:
35     interface: mgmt0
36     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') }}"
37     mask: "{{ hostvars[vm_host].vm_host.network.mask }}"
38     gateway: "{{ hostvars[vm_host].vm_host.network.gateway | default(hostvars[vm_host].vm_host.network.ip) }}"
39   secondary:
40     svc0:
41       ip:   192.168.34.75
42       mask: 255.255.255.0