40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
- name: Deploy Docker Swarm mgmt & stacks
|
|
hosts: prod_vms
|
|
vars:
|
|
ansible_python_interpreter: /opt/docker-venv/bin/python
|
|
become: true
|
|
|
|
roles:
|
|
- role: docker/swarm/prereqs
|
|
|
|
- role: docker/swarm/node
|
|
when: "'swarm_manager' in hostvars[inventory_hostname]['vm_roles']"
|
|
|
|
- role: docker/swarm/stacks
|
|
when: "'swarm_manager' in hostvars[inventory_hostname]['vm_roles']"
|
|
vars:
|
|
stacks:
|
|
- name: postgresql
|
|
compose_path: postgresql-compose.yml
|
|
|
|
- name: portainer
|
|
compose_path: portainer-compose.yml
|
|
|
|
- name: nginx
|
|
compose_path: nginx-compose.yml
|
|
|
|
- name: dumbwhois
|
|
compose_path: dumbwhois-compose.yml
|
|
|
|
- name: flowtodo
|
|
compose_path: flowtodo-compose.yml
|
|
|
|
- name: traefik
|
|
compose_path: traefik-compose.yml
|
|
mount_dirs:
|
|
- /docker-shared/stacks/data/traefik/certs
|
|
- /docker-shared/stacks/data/traefik/dynamic
|
|
- /docker-shared/stacks/data/traefik/logs
|
|
|
|
- name: scylladb
|
|
compose_path: scylladb-compose.yml |