2025-08-16 18:58:02 +10:00

830 B

Ansible Server

Ansible playbook to setup docker compose and start arbitraty number of compose stacks by using group_variables.

This playbook was tested against a debian 12 image.

Usage

ansible-playbook run.yml
ansible-playbook run.yml --ask-pass --ask-become-pass
ansible-playbook run.yml --vault-password-file .vault_pass

Variables

Should be defined in group_vars/server/vars.yml:

  • services_dir: folder path containing all folders with docker-compose stacks. they should have the scructure <service>/docker-compose.yml and optionally include <service>/.env files
  • services: list of services in the service_dir container all <service> folders

Secrets

ansible-vault create secret.yml
ansible-vault edit secret
ansible-vault view secret
ansible-vault encrypt secret.yml