deployment/main.yml

44 lines
682 B
YAML

---
- name: Initialize base server.
hosts: all
become: yes
roles:
- install-base-packages
- sysctl
- networking
- set-hostname
- docker
tags: base
- name: Initialize Docker swarm.
hosts: admin
roles:
- docker-swarm-init
tags: swarm
- name: Add managers to swarm.
hosts: managers
roles:
- docker-swarm-add-manager
tags: swarm
- name: Add workers to swarm.
hosts: workers
roles:
- docker-swarm-add-worker
tags: swarm
- name: Deploy Portainer.
hosts: admin
become: yes
roles:
- portainer-deploy
tags: portainer
- name: Deploy Traefik.
hosts: admin
become: yes
roles:
- traefik-deploy
tags: traefik