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

40 lines
887 B
YAML

---
- name: Converge
hosts: all
roles:
- ansible-role-swarm
vars:
swarm_proxy_url: http://127.0.0.1:3128
swarm_manager: true
swarm_init: true
swarm_networks:
proxy:
swarm_services:
traefik:
image: traefik:1.7
networks:
- proxy
args:
- '--api'
- '--docker'
publish:
- published_port: 80
target_port: 80
mode: host
mounts:
- source: /var/run/docker.sock
target: /var/run/docker.sock
whoami:
image: jwilder/whoami
networks:
- proxy
labels:
traefik.enable: 'true'
traefik.backend: whoami
traefik.frontend.rule: 'Host:whoami'
traefik.port: '8000'
pre_tasks:
- name: update apt cache
ansible.builtin.apt:
update_cache: true