2023-09-18 16:42:05 +00:00
|
|
|
---
|
2023-09-18 19:28:22 +00:00
|
|
|
|
2023-09-18 16:42:05 +00:00
|
|
|
- name: Create podman folder
|
|
|
|
file:
|
|
|
|
path: /root/.config/containers/systemd/
|
|
|
|
state: directory
|
|
|
|
mode: 0775
|
|
|
|
recurse: yes
|
|
|
|
|
|
|
|
- name: Create letsencrypt folder
|
|
|
|
file:
|
|
|
|
path: /letsencrypt
|
|
|
|
state: directory
|
|
|
|
mode: 0775
|
|
|
|
recurse: yes
|
|
|
|
|
2023-09-18 17:49:27 +00:00
|
|
|
- name: Create letsencrypt folder
|
|
|
|
file:
|
|
|
|
path: /etc/traefik
|
|
|
|
state: directory
|
|
|
|
mode: 0775
|
|
|
|
recurse: yes
|
|
|
|
|
2023-09-18 16:42:05 +00:00
|
|
|
- name: Setup Podman quadlet
|
|
|
|
block:
|
|
|
|
- name: Copy traefik.network
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: traefik.network
|
|
|
|
dest: "/root/.config/containers/systemd/traefik.network"
|
|
|
|
|
|
|
|
- name: Copy traefik.container
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: traefik.quadlet.j2
|
|
|
|
dest: "/root/.config/containers/systemd/traefik.container"
|
|
|
|
|
|
|
|
- name: Copy traefik.yml
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: traefik.yaml.j2
|
|
|
|
dest: "/etc/traefik/traefik.yaml"
|
|
|
|
|
|
|
|
notify:
|
|
|
|
- Reload systemd
|
|
|
|
- Restart traefik
|
|
|
|
|
|
|
|
- name: Start Traefik
|
|
|
|
systemd_service:
|
|
|
|
enabled: true
|
|
|
|
name: traefik
|
|
|
|
state: started
|
|
|
|
scope: "user"
|
2023-09-19 15:51:18 +00:00
|
|
|
environment:
|
|
|
|
XDG_RUNTIME_DIR: /var/run
|