Decomment hosts

This commit is contained in:
Alexandre Iooss 2020-05-03 18:40:26 +02:00
parent 3b72e2fe2d
commit dc2db3d6a3
No known key found for this signature in database
GPG key ID: 6C79278F3FCDCC02
4 changed files with 29 additions and 319 deletions

View file

@ -6,10 +6,15 @@ HOSTS=$(grep -ve '^[#\[]' hosts \
| grep -F adm.auro.re \ | grep -F adm.auro.re \
| sort -u) | sort -u)
# Ask password
read -s -p "Hello adventurer, what is your LDAP password? " passwd
echo
for host in $HOSTS; do for host in $HOSTS; do
echo "Handling host $host" echo "[+] Handling host $host"
# sshpass can be used for non-interactive password authentication. # sshpass can be used for non-interactive password authentication.
# place your password in ldap-password.txt. # place your password in ldap-password.txt.
sshpass -f ldap-password.txt ssh-copy-id "$host" SSHPASS=${passwd} sshpass -v -e ssh-copy-id -i ~/.ssh/id_rsa "$host"
done done

43
hosts
View file

@ -5,33 +5,33 @@
# > Then we regroup everything in global geographic and type groups. # > Then we regroup everything in global geographic and type groups.
[aurore_pve] [aurore_pve]
#merlin.adm.auro.re merlin.adm.auro.re
[aurore_vm] [aurore_vm]
#radius-aurore.adm.auro.re radius-aurore.adm.auro.re
[ovh_pve] [ovh_pve]
#horus.adm.auro.re horus.adm.auro.re
[ovh_container] [ovh_container]
#synapse.adm.auro.re synapse.adm.auro.re
#services-bdd.adm.auro.re services-bdd.adm.auro.re
#phabricator.adm.auro.re phabricator.adm.auro.re
#wiki.adm.auro.re wiki.adm.auro.re
#www.adm.auro.re www.adm.auro.re
#proxy.adm.auro.re proxy.adm.auro.re
#matrix-services.adm.auro.re matrix-services.adm.auro.re
[ovh_vm] [ovh_vm]
#re2o-server.adm.auro.re re2o-server.adm.auro.re
#re2o-ldap.adm.auro.re re2o-ldap.adm.auro.re
#re2o-db.adm.auro.re re2o-db.adm.auro.re
#serge.adm.auro.re serge.adm.auro.re
#passbolt.adm.auro.re passbolt.adm.auro.re
#vpn-ovh.adm.auro.re vpn-ovh.adm.auro.re
#docker-ovh.adm.auro.re docker-ovh.adm.auro.re
#switchs-manager.adm.auro.re switchs-manager.adm.auro.re
#radius-aurore.adm.auro.re radius-aurore.adm.auro.re
[ovh_testing_vm] [ovh_testing_vm]
#re2o-test.adm.auro.re #re2o-test.adm.auro.re
@ -88,7 +88,7 @@ ldap-replica-edc.adm.auro.re
#ldap-replica-edc-backup.adm.auro.re #ldap-replica-edc-backup.adm.auro.re
[gs_pve] [gs_pve]
#perceval.adm.auro.re perceval.adm.auro.re
[gs_vm] [gs_vm]
routeur-gs.adm.auro.re routeur-gs.adm.auro.re
@ -96,6 +96,7 @@ unifi-gs.adm.auro.re
radius-gs.adm.auro.re radius-gs.adm.auro.re
dns-gs.adm.auro.re dns-gs.adm.auro.re
dhcp-gs.adm.auro.re dhcp-gs.adm.auro.re
prometheus-gs.adm.auro.re
#ldap-replica-gs.adm.auro.re #ldap-replica-gs.adm.auro.re
#ldap-replica-gs-backup.adm.auro.re #ldap-replica-gs-backup.adm.auro.re
@ -188,7 +189,7 @@ ldap-replica-pacaterie-backup.adm.auro.re
[ldap_replica_edc] [ldap_replica_edc]
ldap-replica-edc.adm.auro.re ldap-replica-edc.adm.auro.re
ldap-replica-edc-backup.adm.auro.re #ldap-replica-edc-backup.adm.auro.re
[ldap_replica_gs] [ldap_replica_gs]
ldap-replica-gs.adm.auro.re ldap-replica-gs.adm.auro.re

View file

@ -1,131 +0,0 @@
# Aurore servers inventory
# How to name your server ?
# > We name servers according to location, then type.
# > So all containers at OVH are in ovh-container.
# > Then we regroup everything in global geographic and type groups.
[ovh_pve]
#horus.adm.auro.re
[ovh_container]
#synapse.adm.auro.re
#services-bdd.adm.auro.re
#phabricator.adm.auro.re
#wiki.adm.auro.re
#www.adm.auro.re
#proxy.adm.auro.re
#matrix-services.adm.auro.re
[ovh_vm]
#re2o-server.adm.auro.re
#re2o-ldap.adm.auro.re
#re2o-db.adm.auro.re
#serge.adm.auro.re
#passbolt.adm.auro.re
#vpn-ovh.adm.auro.re
#docker-ovh.adm.auro.re
#switchs-manager.adm.auro.re
#radius-aurore.adm.auro.re
[ovh_testing_vm]
#re2o-test.adm.auro.re
[fleming_pve]
#freya.adm.auro.re
[fleming_vm]
#ldap-replica-fleming1.adm.auro.re
#ldap-replica-fleming2.adm.auro.re
#dhcp-fleming.adm.auro.re
#dhcp-fleming-backup.adm.auro.re
#dns-fleming.adm.auro.re
#dns-fleming-backup.adm.auro.re
#radius-fleming.adm.auro.re
#radius-fleming-backup.adm.auro.re
#routeur-fleming.adm.auro.re
#routeur-fleming-backup.adm.auro.re
#unifi-fleming.adm.auro.re
#prometheus
[pacaterie_pve]
#mordred.adm.auro.re
[pacaterie_vm]
#ldap-replica-pacaterie.adm.auro.re
#dhcp-pacaterie.adm.auro.re
#dns-pacaterie.adm.auro.re
#prometheus-pacaterie.adm.auro.re
#radius-pacaterie.adm.auro.re
#unifi-pacaterie.adm.auro.re
#routeur-pacaterie.adm.auro.re
[edc_pve]
#chapalux.adm.auro.re
[edc_vm]
#routeur-edc.adm.auro.re
#dns-edc.adm.auro.re
#dhcp-edc.adm.auro.re
#unifi-edc.adm.auro.re
#radius-edc.adm.auro.re
#routeur-aurore.adm.auro.re
#10.128.0.254
[georgesand_pve]
#perceval.adm.auro.re
[georgesand_vm]
#routeur-gs.adm.auro.re
#unifi-gs.adm.auro.re
#radius-gs.adm.auro.re
#dns-gs.adm.auro.re
#dhcp-gs.adm.auro.re
# everything at ovh
[ovh:children]
ovh_pve
ovh_container
ovh_vm
# everything at ovh_testing
[ovh_testing:children]
ovh_testing_vm
# everything at fleming
[fleming:children]
fleming_pve
fleming_vm
# everything at pacaterie
[pacaterie:children]
pacaterie_pve
pacaterie_vm
# everything at edc
[edc:children]
edc_pve
edc_vm
# everything at georgesand
[georgesand:children]
georgesand_pve
georgesand_vm
# every LXC container
[container:children]
ovh_container
# every virtual machine
[vm:children]
ovh_vm
fleming_vm
pacaterie_vm
# every PVE
[pve:children]
ovh_pve
fleming_pve
pacaterie_pve
edc_pve
georgesand_pve

View file

@ -1,165 +0,0 @@
# Aurore servers inventory
# How to name your server ?
# > We name servers according to location, then type.
# > So all containers at OVH are in ovh-container.
# > Then we regroup everything in global geographic and type groups.
[aurore_pve]
merlin.adm.auro.re
[aurore_vm]
radius-aurore.adm.auro.re
[ovh_pve]
horus.adm.auro.re
[ovh_container]
synapse.adm.auro.re
services-bdd.adm.auro.re
phabricator.adm.auro.re
wiki.adm.auro.re
www.adm.auro.re
proxy.adm.auro.re
matrix-services.adm.auro.re
[ovh_vm]
re2o-server.adm.auro.re
re2o-ldap.adm.auro.re
re2o-db.adm.auro.re
serge.adm.auro.re
passbolt.adm.auro.re
vpn-ovh.adm.auro.re
docker-ovh.adm.auro.re
switchs-manager.adm.auro.re
radius-aurore.adm.auro.re
[ovh_testing_vm]
re2o-test.adm.auro.re
[fleming_pve]
freya.adm.auro.re
marki.adm.auro.re
[fleming_vm]
ldap-replica-fleming.adm.auro.re
ldap-replica-fleming-backup.adm.auro.re
dhcp-fleming.adm.auro.re
dhcp-fleming-backup.adm.auro.re
dns-fleming.adm.auro.re
dns-fleming-backup.adm.auro.re
prometheus-fleming.adm.auro.re
radius-fleming.adm.auro.re
radius-fleming-backup.adm.auro.re
unifi-fleming.adm.auro.re
routeur-fleming.adm.auro.re
routeur-fleming-backup.adm.auro.re
[pacaterie_pve]
mordred.adm.auro.re
titan.adm.auro.re
[pacaterie_vm]
ldap-replica-pacaterie.adm.auro.re
ldap-replica-pacaterie-backup.adm.auro.re
dhcp-pacaterie.adm.auro.re
dhcp-pacaterie-backup.adm.auro.re
dns-pacaterie.adm.auro.re
dns-pacaterie-backup.adm.auro.re
prometheus-pacaterie.adm.auro.re
radius-pacaterie.adm.auro.re
radius-pacaterie-backup.adm.auro.re
unifi-pacaterie.adm.auro.re
routeur-pacaterie.adm.auro.re
routeur-pacaterie-backup.adm.auro.re
[edc_pve]
chapalux.adm.auro.re
[edc_vm]
routeur-edc.adm.auro.re
dns-edc.adm.auro.re
dhcp-edc.adm.auro.re
unifi-edc.adm.auro.re
radius-edc.adm.auro.re
routeur-aurore.adm.auro.re
[gs_pve]
perceval.adm.auro.re
[gs_vm]
routeur-gs.adm.auro.re
unifi-gs.adm.auro.re
radius-gs.adm.auro.re
dns-gs.adm.auro.re
dhcp-gs.adm.auro.re
# everything at ovh
[ovh:children]
ovh_pve
ovh_container
ovh_vm
# everything at ovh_testing
[ovh_testing:children]
ovh_testing_vm
# everything at fleming
[fleming:children]
fleming_pve
fleming_vm
# everything at pacaterie
[pacaterie:children]
pacaterie_pve
pacaterie_vm
# everything at edc
[edc:children]
edc_pve
edc_vm
# everything at georgesand
[gs:children]
gs_pve
gs_vm
# every LXC container
[container:children]
ovh_container
# every virtual machine
[vm:children]
ovh_vm
fleming_vm
pacaterie_vm
gs_vm
# every PVE
[pve:children]
ovh_pve
fleming_pve
pacaterie_pve
edc_pve
gs_pve
[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-gs.adm.auro.re
[dns]
dns-fleming.adm.auro.re
dns-fleming-backup.adm.auro.re
dns-pacaterie.adm.auro.re
dns-pacaterie-backup.adm.auro.re
dns-edc.adm.auro.re
dns-gs.adm.auro.re
[ldap-replica]
ldap-replica-fleming.adm.auro.re
ldap-replica-fleming-backup.adm.auro.re
ldap-replica-pacaterie-backup.adm.auro.re