--- - hosts: default connection: local vars: docker_swarm_manager: true docker_advertise_addr: 127.0.0.1 docker_networks: - name: proxy config: - gateway: 172.45.0.1 subnet: 172.45.0.0/16 docker_services: - name: traefik image: traefik:1.7 networks: - proxy args: - '--api' - '--docker' publish: - published_port: 80 target_port: 80 mounts: - source: /var/run/docker.sock target: /var/run/docker.sock - name: whoami image: jwilder/whoami networks: - proxy labels: traefik.enable: 'true' traefik.backend: whoami traefik.frontend.rule: 'Host:whoami' traefik.port: '8000' roles: - ansible-role-docker