dhcpd: add new VMs

This commit is contained in:
jeltz 2023-01-07 02:42:18 +01:00
parent c32b949d04
commit eca5d1563d
Signed by: jeltz
GPG key ID: 800882B66C0C3326

View file

@ -1,8 +1,8 @@
#!/usr/bin/env ansible-playbook
---
- hosts:
- dhcp-1.isp.auro.re
- dhcp-2.isp.auro.re
- dhcp-1.isp.infra.auro.re
- dhcp-2.isp.infra.auro.re
vars:
dhcpd__omapi_key:
algorithm: hmac-sha512
@ -14,10 +14,11 @@
- client-3
- client-4
dhcpd__dns_servers:
- 10.128.0.127
- 10.128.10.3
- 10.128.10.103
dhcpd__domain_search:
- isp.auro.re
- auro.re
- isp.infra.auro.re.
- auro.re.
dhcpd__subnets:
- network: 100.64.0.0/27
routers:
@ -54,10 +55,14 @@
end: 100.64.0.159
domain_name: client-4.isp.auro.re
failover: true
# FIXME: ugly
dhcpd__failover_primary: "{{ inventory_hostname_short == 'dhcp-1' }}"
dhcpd__failover_address: "{{ '10.128.0.204' if dhcpd__failover_primary else '10.128.0.91' }}"
dhcpd__failover_peer_address: "{{ '10.128.0.91' if dhcpd__failover_primary else '10.128.0.204' }}"
dhcpd__failover:
dhcp-1.isp.infra.auro.re: 10.210.1.1
dhcp-2.isp.infra.auro.re: 10.210.1.2
dhcpd__failover_peer: "{{ dhcpd__failover.keys()
| select('!=', inventory_hostname)
| first }}"
dhcpd__failover_address: "{{ dhcpd__failover[dhcpd__failover_peer] }}"
dhcpd__failover_peer_address: "{{ dhcpd__failover[inventory_hostname] }}"
roles:
- dhcpd
...