ansible-nas/roles/thelounge/tasks/main.yml
HitLuca 59e47c4ebf 🏗️ converted remaining tasks to proper roles, moving vars definitions into proper role subfolder.
🐛 added missing entries in nas.yml (?!?)
♻️ reordered entries in nas.yml in alphabetical order. Renamed vd variables to virtual_desktop for ease of understanding
2022-07-27 10:41:17 +02:00

35 lines
1.2 KiB
YAML

---
- name: The Lounge Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ thelounge_data_directory }}"
- "{{ thelounge_data_directory }}/users"
- name: Set up admin user
copy:
src: files/thelounge/users/admin.json
dest: "{{ thelounge_data_directory }}/users/admin.json"
mode: 0777
- name: The Lounge Docker Container
docker_container:
name: thelounge
image: thelounge/thelounge:latest
pull: true
ports:
- "{{ thelounge_port_one }}:9001"
- "{{ thelounge_port_two }}:9000"
volumes:
- "{{ thelounge_data_directory }}:/var/opt/thelounge"
- "/var/run/dbus:/var/run/dbus"
restart_policy: unless-stopped
memory: "{{ thelounge_memory }}"
labels:
traefik.enable: "{{ thelounge_available_externally | string }}"
traefik.http.routers.thelounge.rule: "Host(`{{ thelounge_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.thelounge.tls.certresolver: "letsencrypt"
traefik.http.routers.thelounge.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.thelounge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.thelounge.loadbalancer.server.port: "9000"