ansible-nas/roles/guacamole/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

51 lines
1.5 KiB
YAML

---
- name: Create Guacamole directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ guacamole_data_directory }}/config"
- name: Remove Old Guacamole Mysql Docker Container
docker_container:
name: guacamole-mysql
state: absent
keep_volumes: true
- name: Remove Old Guacamole guacd Docker Container
docker_container:
name: guacamole-guacd
state: absent
keep_volumes: true
- name: Remove old Guacamole directories
file:
path: "{{ item }}"
state: absent
with_items:
- "{{ guacamole_data_directory }}/mysql"
- name: Guacamole Container
docker_container:
name: guacamole
image: "oznu/guacamole"
pull: true
volumes:
- "{{ guacamole_data_directory }}/config:/config:rw"
ports:
- "{{ guacamole_port }}:8080"
restart_policy: unless-stopped
memory: "{{ guacamole_memory }}"
labels:
traefik.enable: "{{ guacamole_available_externally | string }}"
traefik.http.routers.guacamole.rule: "Host(`{{ guacamole_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.guacamole.tls.certresolver: "letsencrypt"
traefik.http.routers.guacamole.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.guacamole.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.guacamole.loadbalancer.server.port: "8080"
- name: Restart Guacamole Container
docker_container:
name: guacamole
image: "oznu/guacamole"
restart: true