diff --git a/roles/thelounge/tasks/main.yml b/roles/thelounge/tasks/main.yml new file mode 100644 index 0000000..f012f02 --- /dev/null +++ b/roles/thelounge/tasks/main.yml @@ -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" diff --git a/roles/thelounge/templates/thelounge.container b/roles/thelounge/templates/thelounge.container new file mode 100644 index 0000000..9effd08 --- /dev/null +++ b/roles/thelounge/templates/thelounge.container @@ -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 diff --git a/roles/thelounge/templates/thelounge.volume b/roles/thelounge/templates/thelounge.volume new file mode 100644 index 0000000..ac04b1e --- /dev/null +++ b/roles/thelounge/templates/thelounge.volume @@ -0,0 +1,2 @@ +[Volume] +VolumeName=thelounge-data