Juan Ferrer 1553e27281 | ||
---|---|---|
collections | ||
inventories | ||
playbooks | ||
roles | ||
.gitignore | ||
README.md | ||
ansible.cfg | ||
vault-playbook.sh | ||
vault.yml |
README.md
Verdnatura Ansible playbooks
Collection of Ansible playbooks used in the Verdnatura server farm.
Install Ansible
Instal Ansible on Debian.
apt install ansible
Run playbook
Before merging changes into protected branches, playbooks should be tested locally to ensure they work properly.
Launch playbook on the fly on a host not declared in the inventory.
ansible-playbook.sh -i <ip_or_hostname>, [--tags tag1,tag2] playbooks/test.yml
Note the comma at the end of the hostname or IP.
Manage vault
When running playbooks that use the vault, the vault-playbook.sh script can be used, it is ovelay over the original ansible-playbook command. Note that password must be saved into .vaultpass file.
Edit vault file.
ansible-vault edit vault.yml
Common playbooks
- facts.yml: Collect and display facts from a host
- ping.yml: Check that a host is alive and reachable
- awx.yml: Create and configure AWX user
- debian.yml: Setup base Debian server