mirror of
https://github.com/davestephens/ansible-nas
synced 2024-11-16 00:38:02 +00:00
4b5330f4a2
Fix traefik v1.7
34 lines
863 B
YAML
34 lines
863 B
YAML
---
|
|
- name: Ensure Nginx Docker Container is absent
|
|
docker_container:
|
|
name: nginx-proxy
|
|
state: absent
|
|
|
|
- name: Nginx Letsencrypt Container is absent
|
|
docker_container:
|
|
name: letsencrypt-nginx-proxy-companion
|
|
state: absent
|
|
|
|
- name: Create Traefik Directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ traefik_data_directory }}"
|
|
|
|
- name: Template Traefik config.toml
|
|
template:
|
|
src: traefik/traefik.toml
|
|
dest: "{{ traefik_data_directory }}/traefik.toml"
|
|
|
|
- name: Traefik Docker Container
|
|
docker_container:
|
|
name: traefik
|
|
image: "{{ traefik_docker_image }}"
|
|
pull: true
|
|
network_mode: host
|
|
volumes:
|
|
- "{{ traefik_data_directory }}/traefik.toml:/etc/traefik/traefik.toml:ro"
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|