2018-12-22 13:55:51 +00:00
|
|
|
---
|
2021-11-22 10:27:46 +00:00
|
|
|
- name: Converge
|
|
|
|
hosts: all
|
|
|
|
roles:
|
|
|
|
- swarm
|
2018-12-22 13:55:51 +00:00
|
|
|
vars:
|
2021-11-22 10:43:06 +00:00
|
|
|
swarm_manager: true
|
|
|
|
swarm_networks:
|
2021-11-22 10:56:01 +00:00
|
|
|
proxy:
|
2021-11-22 10:43:06 +00:00
|
|
|
swarm_services:
|
2021-11-22 10:56:01 +00:00
|
|
|
traefik:
|
2019-08-24 10:55:56 +00:00
|
|
|
image: traefik:1.7
|
2019-03-17 21:43:20 +00:00
|
|
|
networks:
|
2019-08-24 10:55:56 +00:00
|
|
|
- proxy
|
|
|
|
args:
|
|
|
|
- '--api'
|
|
|
|
- '--docker'
|
|
|
|
publish:
|
|
|
|
- published_port: 80
|
|
|
|
target_port: 80
|
2021-11-22 10:27:46 +00:00
|
|
|
mode: host
|
2019-08-24 10:55:56 +00:00
|
|
|
mounts:
|
|
|
|
- source: /var/run/docker.sock
|
|
|
|
target: /var/run/docker.sock
|
2021-11-22 10:56:01 +00:00
|
|
|
whoami:
|
2019-08-24 10:55:56 +00:00
|
|
|
image: jwilder/whoami
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
labels:
|
|
|
|
traefik.enable: 'true'
|
|
|
|
traefik.backend: whoami
|
|
|
|
traefik.frontend.rule: 'Host:whoami'
|
|
|
|
traefik.port: '8000'
|
|
|
|
|
2021-11-22 10:27:46 +00:00
|
|
|
pre_tasks:
|
|
|
|
- name: update apt cache
|
|
|
|
ansible.builtin.apt:
|
|
|
|
update_cache: true
|