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

45 lines
945 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:
2022-04-07 07:56:42 +00:00
- ansible-role-swarm
2018-12-22 13:55:51 +00:00
vars:
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:
2023-11-23 10:12:18 +00:00
- name: Update apt cache
2021-11-22 10:27:46 +00:00
ansible.builtin.apt:
update_cache: true
2023-11-23 10:12:18 +00:00
- name: Install package for tests
ansible.builtin.package:
name:
- curl