deployment/main.yml

46 lines
713 B
YAML

---
- name: Initialize base server.
hosts: all
become: yes
roles:
- install-base-packages
- net-security
- set-hostname
- docker
tags: base
- name: Initialize Docker swarm.
hosts: admin
become: yes
roles:
- docker-swarm-init
tags: swarm
- name: Add managers to swarm.
hosts: managers
become: yes
roles:
- docker-swarm-add-manager
tags: swarm
- name: Add workers to swarm.
hosts: workers
become: yes
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