2018-11-25 11:10:14 +00:00
|
|
|
---
|
2018-11-28 23:10:27 +00:00
|
|
|
- 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
|
2018-12-08 22:44:51 +00:00
|
|
|
state: absent
|
2018-11-28 23:10:27 +00:00
|
|
|
|
2018-11-25 11:10:14 +00:00
|
|
|
- name: Create Trafik 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
|
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
- "8083:8083"
|
|
|
|
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
|