docker-services/tasks/traefik.yml
2022-08-05 20:59:55 +02:00

38 lines
961 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- name: traefik | check vars are defined
assert:
that:
- traefik_domain is defined
- traefik_letsencrypt_email is defined
tags: ['docker_traefik']
- include_tasks: base.yml
tags: ['docker_traefik']
- name: traefik | create docker network
docker_network:
name: 'traefik'
tags: ['docker_traefik']
- name: traefik | create letsencrypt docker volume
docker_volume:
name: traefik__letsencrypt
register: register_docker_volume_traefik__letsencrypt
tags: ['docker_traefik']
- name: traefik | create config docker volume
docker_volume:
name: traefik__etc_traefik
register: register_docker_volume_traefik__etc_traefik
tags: ['docker_traefik']
- name: traefik | copy configuration file
template:
src: config/traefik/traefik.yml.j2
dest: /var/lib/docker/volumes/traefik__etc_traefik/_data/traefik.yml
owner: root
group: root
mode: 0644
notify: traefik-restart
tags: ['docker_traefik']