ansible/playbooks/dhcpd.yml

71 lines
2 KiB
YAML
Raw Normal View History

2022-08-27 10:37:56 +02:00
#!/usr/bin/env ansible-playbook
---
- hosts:
2023-01-07 02:42:18 +01:00
- dhcp-1.isp.infra.auro.re
- dhcp-2.isp.infra.auro.re
2022-08-27 10:37:56 +02:00
vars:
dhcpd__omapi_key:
algorithm: hmac-sha512
secret: 99XuJO0ofX3VAnWWlyixWbQ5YTagPfgxyh14IbLNBb3/JzEklkWopvQdj/PXVYbfb/sRyFJBhLexPag4dLh7PA==
dhcpd__interfaces:
2023-03-28 20:36:46 +02:00
- client0
- client1
- client2
- client3
- client4
2022-08-27 10:37:56 +02:00
dhcpd__dns_servers:
2023-01-07 02:42:18 +01:00
- 10.128.10.3
- 10.128.10.103
2022-08-27 10:37:56 +02:00
dhcpd__domain_search:
2023-03-28 20:36:46 +02:00
- isp.auro.re.
2023-01-07 02:42:18 +01:00
- auro.re.
2022-08-27 10:37:56 +02:00
dhcpd__subnets:
- network: 100.64.0.0/27
routers:
- 100.64.0.1
start: 100.64.0.4
end: 100.64.0.30
2023-03-28 20:36:46 +02:00
domain_name: client0.isp.auro.re
2022-08-27 10:37:56 +02:00
failover: true
- network: 100.64.0.32/27
routers:
- 100.64.0.31
start: 100.64.0.33
end: 100.64.0.63
2023-03-28 20:36:46 +02:00
domain_name: client1.isp.auro.re
2022-08-27 10:37:56 +02:00
failover: true
- network: 100.64.0.64/27
routers:
- 100.64.0.65
start: 100.64.0.67
end: 100.64.0.95
2023-03-28 20:36:46 +02:00
domain_name: client2.isp.auro.re
2022-08-27 10:37:56 +02:00
failover: true
- network: 100.64.0.96/27
routers:
- 100.64.0.97
start: 100.64.0.99
end: 100.64.0.127
2023-03-28 20:36:46 +02:00
domain_name: client3.isp.auro.re
2022-08-27 10:37:56 +02:00
failover: true
- network: 100.64.0.128/27
routers:
- 100.64.0.129
start: 100.64.0.131
end: 100.64.0.159
2023-03-28 20:36:46 +02:00
domain_name: client4.isp.auro.re
2022-08-27 10:37:56 +02:00
failover: true
2023-01-07 02:42:18 +01:00
dhcpd__failover:
dhcp-1.isp.infra.auro.re: 10.210.1.1
dhcp-2.isp.infra.auro.re: 10.210.1.2
2023-01-07 08:56:12 +01:00
dhcpd__failover_address: "{{ dhcpd__failover[inventory_hostname] }}"
dhcpd__failover_peer_address: "{{ dhcpd__failover
| dict2items
| selectattr('key', '!=',
inventory_hostname)
| map(attribute='value')
| first }}"
2022-08-27 10:37:56 +02:00
roles:
- dhcpd
...