deployment/main.yml

46 lines
713 B
YAML
Raw Normal View History

2021-12-11 16:28:17 +01:00
---
- name: Initialize base server.
hosts: all
become: yes
roles:
- install-base-packages
- net-security
2021-12-11 16:59:48 +01:00
- set-hostname
2021-12-12 22:34:38 +01:00
- docker
2021-12-11 16:59:48 +01:00
tags: base
2021-12-11 16:28:17 +01:00
- 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
2021-12-11 16:59:48 +01:00
- name: Deploy Portainer.
hosts: admin
become: yes
roles:
- portainer-deploy
tags: portainer
- name: Deploy Traefik.
hosts: admin
become: yes
roles:
- traefik-deploy
tags: traefik