hosts: remove dhcp and recursive_dns groups

Use patterns instead for now.
This commit is contained in:
Yohaï-Eliel BERREBY 2020-05-09 10:15:28 +02:00
parent 3f26e7d4b4
commit dea4dda285
3 changed files with 9 additions and 36 deletions

27
hosts
View file

@ -190,33 +190,6 @@ gs_pve
###############################################################################
# Groups by service
[dhcp]
dhcp-fleming.adm.auro.re
dhcp-fleming-backup.adm.auro.re
dhcp-pacaterie.adm.auro.re
dhcp-pacaterie-backup.adm.auro.re
dhcp-edc.adm.auro.re
dhcp-edc-backup.adm.auro.re
#dhcp-gs.adm.auro.re
[rdns_main]
dns-fleming.adm.auro.re
dns-pacaterie.adm.auro.re
dns-edc.adm.auro.re
[rdns_backup]
dns-fleming-backup.adm.auro.re
dns-pacaterie-backup.adm.auro.re
dns-edc-backup.adm.auro.re
[recursive_dns:children]
rdns_main
rdns_backup
# FIXME:
#dns-edc.adm.auro.re
#dns-gs.adm.auro.re
[ldap_replica:children]
ldap_replica_fleming
ldap_replica_pacaterie

View file

@ -1,7 +1,7 @@
#!/usr/bin/env ansible-playbook
---
# Set up DHCP servers.
- hosts: dhcp-pacaterie*.adm.auro.re
- hosts: dhcp-*.adm.auro.re, !dhcp-aurore*.adm.auro.re,!dhcp-gs*.adm.auro.re
vars:
service_repo: https://gitlab.federez.net/re2o/dhcp.git
service_name: dhcp
@ -16,15 +16,15 @@
# Deploy unbound DNS server (recursive).
#- hosts: recursive_dns
# roles:
# - unbound
- hosts: dns-*.adm.auro.re,!dns-aurore*.adm.auro.re,!dns-gs*.adm.auro.re
roles:
- unbound
# Déploiement du service re2o aurore-firewall et keepalived
#- hosts: routeur-pacaterie.adm.auro.re
# roles:
# - router
- hosts: ~routeur-(pacaterie|edc).*\.adm\.auro\.re
roles:
- router
# WIP: Deploy authoritative DNS servers

View file

@ -4,12 +4,12 @@
- name: set dns_host_suffix (main)
set_fact:
dns_host_suffix: "{{ dns_host_suffix_main }}"
when: "'rdns_main' in group_names"
when: "'backup' not in inventory_hostname"
- name: set dns_host_suffix (backup)
set_fact:
dns_host_suffix: "{{ dns_host_suffix_backup }}"
when: "'rdns_backup' in group_names"
when: "'backup' in inventory_hostname"
- name: install unbound