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 c8617e45cc Add CodiMD container 5 years ago
group_vars Update hosts 6 years ago
roles Add CodiMD container 5 years ago
.gitignore Initial commit 6 years ago
README.md FAQ: how to list facts 6 years ago
base.yml Initial commit 6 years ago
codimd.yml Add CodiMD container 5 years ago
dokuwiki.yml Dokuwiki role 6 years ago
etherpad.yml Add Debian backports role 5 years ago
hosts Add CodiMD container 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-riot-web.yml Beggining of Matrix Riot server 5 years ago
nginx-reverse-proxy.yml Update hosts 6 years ago

README.md

Playbook et rôles Ansible d'Aurore

Pour cloner ce projet :

git clone --recursive git@gitlab.federez.net:erdnaxe/ansible-aurore.git

Exécution d'un playbook

Pour tester :

ansible-playbook --ask-vault-pass -bK -i hosts base.yml --check --diff

Pour appliquer :

ansible-playbook --ask-vault-pass -bK -i hosts base.yml

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 ProxyCommand. Dans la configuration SSH :

# Keep session alive only for bastion
Host proxy.auro.re
    ControlMaster auto
    ControlPath ~/.ssh/%r@%h:%p

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

Lister tout ce que sait Ansible sur un hôte

Exemple :

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