feat(thelounge): add quadlet deployment
Related to #51 Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
5057b9fed1
commit
cde2c78a0e
3 changed files with 35 additions and 0 deletions
17
roles/thelounge/tasks/main.yml
Normal file
17
roles/thelounge/tasks/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- name: Install the TheLounge quadlets
|
||||
ansible.builtin.template:
|
||||
src: "templates/{{ item }}"
|
||||
dest: "/etc/containers/systemd/{{ item }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
loop:
|
||||
- thelounge.container
|
||||
- thelounge.volume
|
||||
|
||||
- name: Enable the TheLounge quadlet
|
||||
ansible.builtin.systemd_service:
|
||||
daemon_reload: true
|
||||
enabled: true
|
||||
name: thelounge.service
|
||||
state: "started"
|
16
roles/thelounge/templates/thelounge.container
Normal file
16
roles/thelounge/templates/thelounge.container
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=The Lounge
|
||||
|
||||
[Container]
|
||||
ContainerName=thelounge
|
||||
Image=ghcr.io/thelounge/thelounge:latest
|
||||
|
||||
PublishPort=9000:9000
|
||||
|
||||
Volume=thelounge-data:/var/opt/thelounge
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
2
roles/thelounge/templates/thelounge.volume
Normal file
2
roles/thelounge/templates/thelounge.volume
Normal file
|
@ -0,0 +1,2 @@
|
|||
[Volume]
|
||||
VolumeName=thelounge-data
|
Loading…
Reference in a new issue