2018-12-23 12:20:19 +01:00
|
|
|
# Playbook et rôles Ansible d'Aurore
|
|
|
|
|
2018-12-23 12:25:52 +01:00
|
|
|
Pour cloner ce projet :
|
|
|
|
|
|
|
|
```
|
|
|
|
git clone --recursive git@gitlab.federez.net:erdnaxe/ansible-role-ldap-client.git
|
|
|
|
```
|
|
|
|
|
2018-12-23 12:20:19 +01:00
|
|
|
## Exécution d'un playbook
|
|
|
|
|
2018-12-24 10:50:22 +01:00
|
|
|
Pour tester :
|
|
|
|
```bash
|
|
|
|
ansible-playbook --ask-vault-pass -K -i hosts base.yml --check --diff
|
|
|
|
```
|
|
|
|
|
|
|
|
Pour appliquer :
|
2018-12-23 12:20:19 +01:00
|
|
|
```bash
|
|
|
|
ansible-playbook --ask-vault-pass -K -i hosts base.yml
|
|
|
|
```
|
|
|
|
|
|
|
|
## FAQ
|
|
|
|
|
2018-12-23 16:09:12 +01:00
|
|
|
### Mettre sa clé SSH sur une machine
|
|
|
|
|
|
|
|
```
|
|
|
|
ssh-copy-id -i ~/.ssh/id_rsa_aurore.pub virtu.fede-aurore.net
|
|
|
|
```
|
|
|
|
|
2018-12-23 12:20:19 +01:00
|
|
|
### Automatiquement ajouter fingerprint ECDSA (dangereux !)
|
|
|
|
|
|
|
|
Il faut changer la variable d'environnement suivante :
|
|
|
|
`ANSIBLE_HOST_KEY_CHECKING=0`.
|
|
|
|
|
|
|
|
### Configurer la connexion au bastion
|
|
|
|
|
|
|
|
Dans la configuration SSH :
|
|
|
|
|
|
|
|
```
|
|
|
|
# Keep session alive only for bastion
|
|
|
|
Host proxy.auro.re
|
|
|
|
ControlMaster auto
|
|
|
|
ControlPath ~/.ssh/%r@%h:%p
|
|
|
|
|
|
|
|
Host *.auro.re 10.128.0.*
|
|
|
|
IdentityFile ~/.ssh/id_rsa_aurore
|
|
|
|
ForwardAgent yes
|
|
|
|
```
|