Roles for caddy as well as isso
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Signed-off-by: Nis Wechselberg <enbewe@enbewe.de>
This commit is contained in:
parent
6b7f10a1e1
commit
96a91b2ecb
20 changed files with 696 additions and 0 deletions
62
roles/isso/tasks/main.yml
Normal file
62
roles/isso/tasks/main.yml
Normal file
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
- 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'
|
Loading…
Add table
Add a link
Reference in a new issue