ansible-role-swarm/molecule/default/converge.yml

41 lines
874 B
YAML
Raw Normal View History

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:
2022-04-06 08:17:32 +00:00
swarm_proxy_url: http://127.0.0.1:3128
2021-11-22 10:43:06 +00:00
swarm_manager: true
2021-11-22 13:38:49 +00:00
swarm_init: true
2021-11-22 10:43:06 +00:00
swarm_networks:
proxy:
2021-11-22 10:43:06 +00:00
swarm_services:
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
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