deployment/main.yml

44 lines
682 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
2021-12-13 15:52:04 +01:00
- sysctl
- networking
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
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
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