34 lines
962 B
YAML
34 lines
962 B
YAML
- name: Create traefik app directory
|
|
file:
|
|
path: "{{ service_dir }}"
|
|
state: directory
|
|
- name: Create acme file
|
|
copy:
|
|
content: ""
|
|
dest: "{{ service_dir }}/acme.json"
|
|
force: no
|
|
mode: 0600
|
|
- name: Copy Docker Compose script
|
|
template:
|
|
src: "{{ role_path }}/templates/docker-compose.yml.j2"
|
|
dest: "{{ service_dir }}/docker-compose.yml"
|
|
- name: Copy traefik.toml
|
|
template:
|
|
src: "{{ role_path }}/templates/traefik.toml.j2"
|
|
dest: "{{ service_dir }}/traefik.toml"
|
|
- name: Copy services.toml
|
|
copy:
|
|
src: "{{ role_path }}/files/services.toml"
|
|
dest: "{{ service_dir }}/services.toml"
|
|
- name: Copy basic_auth_users file
|
|
copy:
|
|
src: "{{ role_path }}/files/basic_auth_users"
|
|
dest: "{{ service_dir }}/basic_auth_users"
|
|
- name: Create traefik network
|
|
docker_network:
|
|
name: "traefik"
|
|
- name: Start Docker Compose
|
|
docker_compose:
|
|
project_src: "{{ service_dir }}"
|
|
pull: true
|
|
remove_orphans: true
|