--- - name: Converge hosts: all roles: - ansible-role-swarm vars: 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 - name: Install package for tests ansible.builtin.package: name: - curl