You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Alexandre Iooss 9c5d1c2e58 Let Ansible manage persistent SSH, fix issue #3 5 years ago
group_vars Add LDAP on CodiMD 5 years ago
roles Name correctly LDAP userland scripts 5 years ago
.gitignore Initial commit 6 years ago
README.md Let Ansible manage persistent SSH, fix issue #3 5 years ago
ansible.cfg Clearly a better way to do Ansible 5 years ago
base.yml Initial commit 6 years ago
codimd.yml Role ansible pour setup de CodiMD 5 years ago
dokuwiki.yml Dokuwiki role 6 years ago
etherpad.yml Add Debian backports role 5 years ago
hosts Naming convention 5 years ago
hosts_testing Add testing inventory 6 years ago
ldap.yml Don't execute the Playbook without reading this 6 years ago
matrix.yml Add Matrix synapse 5 years ago
nginx-reverse-proxy.yml Point CodiMD to 8080 port 5 years ago

README.md

Playbook et rôles Ansible d'Aurore

Exécution d'un playbook

Pour appliquer le playbook base.yml :

ansible-playbook --ask-vault-pass base.yml

Il est souhaitable de faire un test avant avec --check si on a des doutes !

FAQ

Mettre sa clé SSH sur une machine

ssh-copy-id -i ~/.ssh/id_rsa_aurore.pub virtu.fede-aurore.net

Automatiquement ajouter fingerprint ECDSA (dangereux !)

Il faut changer la variable d'environnement suivante : ANSIBLE_HOST_KEY_CHECKING=0.

Configurer la connexion au bastion

Envoyer son agent SSH peut être dangereux (source).

On va utiliser plutôt ProxyJump. Dans la configuration SSH :

# Use a key to log on all Aurore servers
# and use a bastion
Host 10.128.0.* *.adm.auro.re
    IdentityFile ~/.ssh/id_rsa_aurore
    ProxyJump proxy.auro.re

Il faut savoir que depuis Ansible 2.5, des connexions persistantes sont créées vers les serveurs puis détruites à la fin de l'exécution. Il faut donc éviter de lancer une connexion SSH persistante pendant l'exécution d'Ansible.

Lister tout ce que sait Ansible sur un hôte

ansible -i hosts ldap-replica-fleming1.adm.auro.re -m setup --ask-vault-pass