Collection of Ansible playbooks used in the Verdnatura server farm
Go to file
David Lopez 2cab97a59a add influxdb2 2024-10-01 08:48:53 +00:00
collections refs #8025 passbolt test 2024-09-30 14:25:35 +02:00
inventories add influxdb2 2024-10-01 08:48:53 +00:00
playbooks refs #8025 passbolt test 2024-09-30 14:25:35 +02:00
roles refs #8025 inventory dns suffix and patterns, added ceph pve and kube playboks, small refactor 2024-09-30 08:07:30 +02:00
.gitignore refs #8025 passbolt test 2024-09-30 14:25:35 +02:00
README.md refs #8025 passbolt test 2024-09-30 14:25:35 +02:00
ansible.cfg refs #8025 passbolt test 2024-09-30 14:25:35 +02:00
requirements.txt refs #8025 python depts fix 2024-10-01 06:49:36 +02:00
vault-playbook.sh refs #8025 vault_password_file commented 2024-09-27 14:07:07 +02:00
vault.yml refs #8025 Vault added, core hosts splitted, tasks parametized, auth enabled 2024-09-27 13:26:47 +02:00

README.md

Verdnatura Ansible playbooks

Collection of Ansible playbooks used in the Verdnatura server farm.

Install Ansible

Instal Ansible on Debian.

apt install ansible

Install dependencies.

ansible-galaxy collection install -r collections/requirements.yml

Create Python virtual environment.

python3 -m venv .pyenv
source .pyenv/bin/activate
pip install -r requirements.txt

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 -i <ip_or_hostname>, [-t tag1,tag2] playbooks/test.yml

Note the comma at the end of the hostname or IP.

Manage vault

To manage Ansible vault place the password into .vaultpass file.

View or edit the vault file.

ansible-vault {view,edit} --vault-pass-file .vaultpass vault.yml

When running playbooks that use the vault the vault-playbook.sh script can be used, it is ovelay over the original ansible-playbook command.

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

Documentation