Clearly a better way to do Ansible
This commit is contained in:
parent
4274194b95
commit
577917e7c8
2 changed files with 29 additions and 6 deletions
|
@ -2,15 +2,12 @@
|
||||||
|
|
||||||
## Exécution d'un playbook
|
## Exécution d'un playbook
|
||||||
|
|
||||||
Pour tester :
|
Pour appliquer le playbook `base.yml` :
|
||||||
```bash
|
```bash
|
||||||
ansible-playbook --ask-vault-pass -bK -i hosts base.yml --check --diff
|
ansible-playbook --ask-vault-pass base.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
Pour appliquer :
|
Il est souhaitable de faire un test avant avec `--check` si on a des doutes !
|
||||||
```bash
|
|
||||||
ansible-playbook --ask-vault-pass -bK -i hosts base.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
|
|
26
ansible.cfg
Normal file
26
ansible.cfg
Normal 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
|
||||||
|
|
Loading…
Reference in a new issue