diff --git a/copy-keys.sh b/copy-keys.sh index 95fc428..6aa1bb6 100755 --- a/copy-keys.sh +++ b/copy-keys.sh @@ -6,10 +6,15 @@ HOSTS=$(grep -ve '^[#\[]' hosts \ | grep -F adm.auro.re \ | sort -u) +# Ask password +read -s -p "Hello adventurer, what is your LDAP password? " passwd +echo + for host in $HOSTS; do - echo "Handling host $host" + echo "[+] Handling host $host" # sshpass can be used for non-interactive password authentication. # 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 + diff --git a/hosts b/hosts index 8718a1d..9ab7012 100644 --- a/hosts +++ b/hosts @@ -5,33 +5,33 @@ # > Then we regroup everything in global geographic and type groups. [aurore_pve] -#merlin.adm.auro.re +merlin.adm.auro.re [aurore_vm] -#radius-aurore.adm.auro.re +radius-aurore.adm.auro.re [ovh_pve] -#horus.adm.auro.re +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 +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 +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 @@ -88,7 +88,7 @@ ldap-replica-edc.adm.auro.re #ldap-replica-edc-backup.adm.auro.re [gs_pve] -#perceval.adm.auro.re +perceval.adm.auro.re [gs_vm] routeur-gs.adm.auro.re @@ -96,6 +96,7 @@ unifi-gs.adm.auro.re radius-gs.adm.auro.re dns-gs.adm.auro.re dhcp-gs.adm.auro.re +prometheus-gs.adm.auro.re #ldap-replica-gs.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.adm.auro.re -ldap-replica-edc-backup.adm.auro.re +#ldap-replica-edc-backup.adm.auro.re [ldap_replica_gs] ldap-replica-gs.adm.auro.re diff --git a/hosts.save b/hosts.save deleted file mode 100644 index c806780..0000000 --- a/hosts.save +++ /dev/null @@ -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 diff --git a/hosts.save.1 b/hosts.save.1 deleted file mode 100644 index db677b4..0000000 --- a/hosts.save.1 +++ /dev/null @@ -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