1
0
Fork 0
ansible-collection-caddy/roles/isso/tasks/main.yml
Nis Wechselberg 96a91b2ecb
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Roles for caddy as well as isso
Signed-off-by: Nis Wechselberg <enbewe@enbewe.de>
2025-05-07 21:37:12 +02:00

62 lines
1.4 KiB
YAML

---
- name: 'Ensure required software is installed'
become: true
ansible.builtin.apt:
name: 'podman'
state: 'present'
- name: 'Create podman network'
become: true
containers.podman.podman_network:
name: '{{ isso_network }}'
ipv6: true
state: 'quadlet'
- name: 'Define isso image'
become: true
containers.podman.podman_image:
name: '{{ isso_image_name }}:{{ isso_image_tag }}'
state: 'quadlet'
notify:
- 'Reload isso services'
- 'Restart isso image'
- name: 'Prepare isso data directories'
become: true
ansible.builtin.file:
name: '{{ item }}'
state: 'directory'
owner: 'root'
group: 'root'
mode: 'u=rwx,g=rx,o=rx'
loop:
- '{{ isso_storage_path }}/data'
- '{{ isso_storage_path }}/cfg'
- name: 'Write isso configuration'
become: true
ansible.builtin.template:
src: 'isso.cfg.j2'
dest: '{{ isso_storage_path }}/cfg/isso.cfg'
owner: 'root'
group: 'root'
mode: 'u=rw,g=r,o=r'
notify:
- 'Restart isso container'
- name: 'Create caddy container'
become: true
containers.podman.podman_container:
name: 'isso'
image: 'isso.image'
network: '{{ isso_network }}.network'
state: 'quadlet'
volume:
- '{{ isso_storage_path }}/data:/db'
- '{{ isso_storage_path }}/cfg:/config'
quadlet_options: |
[Install]
WantedBy=default.target
notify:
- 'Reload isso services'
- 'Restart isso container'