Initialise repository structure and placeholder files. Generic functionality works i guess, need to come up with a better solution for compose templates
This commit is contained in:
commit
53695f4fff
411 files changed
+7817
No files matched your search
@@ -0,0 +1,63 @@
|
||||
---
|
||||
- name: Create Traefik directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "{{ traefik_dir }}"
|
||||
- "{{ traefik_dir }}/data"
|
||||
tags: [traefik]
|
||||
|
||||
- name: Create proxy network
|
||||
community.docker.docker_network:
|
||||
name: "{{ traefik_network }}"
|
||||
state: present
|
||||
tags: [traefik, docker]
|
||||
|
||||
- name: Render Traefik environment
|
||||
ansible.builtin.template:
|
||||
src: env.j2
|
||||
dest: "{{ traefik_dir }}/.env"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
no_log: true
|
||||
tags: [traefik, config]
|
||||
|
||||
- name: Render Traefik static config
|
||||
ansible.builtin.template:
|
||||
src: traefik.yml.j2
|
||||
dest: "{{ traefik_dir }}/traefik.yml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: restart traefik
|
||||
tags: [traefik, config]
|
||||
|
||||
- name: Render Traefik Compose file
|
||||
ansible.builtin.template:
|
||||
src: compose.yaml.j2
|
||||
dest: "{{ traefik_dir }}/compose.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: restart traefik
|
||||
tags: [traefik, compose]
|
||||
|
||||
- name: Allow Traefik TCP ports
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "{{ item }}"
|
||||
proto: tcp
|
||||
loop: "{{ traefik_tcp_ports }}"
|
||||
when: traefik_publish_entrypoints | bool
|
||||
tags: [traefik, firewall]
|
||||
|
||||
- name: Start Traefik
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ traefik_dir }}"
|
||||
state: present
|
||||
tags: [traefik, compose]
|
||||
Reference in new issue
Block a user