Clearly a better way to do Ansible

This commit is contained in:
Alexandre Iooss 2019-02-19 11:27:37 +01:00
parent 4274194b95
commit 577917e7c8
2 changed files with 29 additions and 6 deletions

View file

@ -2,15 +2,12 @@
## Exécution d'un playbook
Pour tester :
Pour appliquer le playbook `base.yml` :
```bash
ansible-playbook --ask-vault-pass -bK -i hosts base.yml --check --diff
ansible-playbook --ask-vault-pass base.yml
```
Pour appliquer :
```bash
ansible-playbook --ask-vault-pass -bK -i hosts base.yml
```
Il est souhaitable de faire un test avant avec `--check` si on a des doutes !
## FAQ

26
ansible.cfg Normal file
View file

@ -0,0 +1,26 @@
# Aurore Ansible configuration
[defaults]
# Use Aurore inventory
inventory = ./hosts
# Custom header in templates
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
# Do not use cows (with cowsay)
nocows = 1
[privilege_escalation]
# Use sudo to get priviledge access
become = True
# Ask for password
become_ask_pass = True
[diff]
# TO know what changed
always = yes