ansible/README.md
2018-12-28 11:30:18 +01:00

1.1 KiB

Playbook et rôles Ansible d'Aurore

Pour cloner ce projet :

git clone --recursive git@gitlab.federez.net:erdnaxe/ansible-role-ldap-client.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 key to log on all Aurore servers
# and use a bastion
Host 10.128.0.*
    IdentityFile ~/.ssh/id_rsa_aurore
    ProxyCommand ssh -q -W %h:%p proxy.auro.re