From dea4dda28500f9af70c404d102fbed45c986a661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoha=C3=AF-Eliel=20BERREBY?= Date: Sat, 9 May 2020 10:15:28 +0200 Subject: [PATCH] hosts: remove dhcp and recursive_dns groups Use patterns instead for now. --- hosts | 27 --------------------------- network.yml | 14 +++++++------- roles/unbound/tasks/main.yml | 4 ++-- 3 files changed, 9 insertions(+), 36 deletions(-) diff --git a/hosts b/hosts index 75a504d..eb71e7f 100644 --- a/hosts +++ b/hosts @@ -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 diff --git a/network.yml b/network.yml index 9613461..f3e72af 100755 --- a/network.yml +++ b/network.yml @@ -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 diff --git a/roles/unbound/tasks/main.yml b/roles/unbound/tasks/main.yml index 3baed92..d20db0c 100644 --- a/roles/unbound/tasks/main.yml +++ b/roles/unbound/tasks/main.yml @@ -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