summaryrefslogtreecommitdiff
path: root/playbooks/roles/traefik/tasks/main.yml
blob: c365f5599941112c78a7a8dbcdd195512b0ddd77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---

- name: Build traefik compose dirs
  ansible.builtin.file:
    state: directory
    dest: '{{ traefik_base }}/{{ item.path }}'
  with_filetree: '../templates'
  when: item.state == 'directory'

- name: Build traefik compose files
  ansible.builtin.template:
    src: '{{ item.src }}'
    dest: '{{ traefik_base }}/{{ item.path }}'
  with_filetree: '../templates'
  when: item.state == 'file'

- name: Deploy Traefik stack
  ansible.builtin.command:
    cmd: "docker stack deploy -c {{ traefik_base }}/stacks/docker-compose.yml traefik"