mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-25 11:03:07 +00:00
58 lines
No EOL
1.6 KiB
YAML
58 lines
No EOL
1.6 KiB
YAML
---
|
|
- name: Create Guacamole directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ guacamole_data_directory }}/mysql"
|
|
|
|
- name: Copy Guacamole database init script
|
|
copy:
|
|
src: files/guacamole/initdb-0.9.14.sql
|
|
dest: "{{ guacamole_data_directory }}/initdb-0.9.14.sql"
|
|
|
|
- name: Guacamole Mysql Docker Container
|
|
docker_container:
|
|
name: guacamole-mysql
|
|
image: mysql:5.7
|
|
pull: true
|
|
volumes:
|
|
- "{{ guacamole_data_directory }}/mysql:/var/lib/mysql:rw"
|
|
- "{{ guacamole_data_directory }}/initdb-0.9.14.sql:/docker-entrypoint-initdb.d/initdb-0.9.14.sql:ro"
|
|
env:
|
|
MYSQL_DATABASE: "guacamole"
|
|
MYSQL_USER: "guacamole-user"
|
|
MYSQL_PASSWORD: "guacamole-pass"
|
|
MYSQL_ROOT_PASSWORD: "guacamole-secret"
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|
|
|
|
- name: Guacamole guacd Container
|
|
docker_container:
|
|
name: guacamole-guacd
|
|
image: "{{ guacamole_guacd_docker_image }}"
|
|
pull: true
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|
|
|
|
- name: Guacamole guacamole Container
|
|
docker_container:
|
|
name: guacamole
|
|
image: "{{ guacamole_docker_image }}"
|
|
pull: true
|
|
links:
|
|
- guacamole-mysql:mysql
|
|
- guacamole-guacd:guacd
|
|
ports:
|
|
- "{{ guacamole_port }}:8080"
|
|
env:
|
|
MYSQL_DATABASE: "guacamole"
|
|
MYSQL_USER: "guacamole-user"
|
|
MYSQL_PASSWORD: "guacamole-pass"
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|
|
labels:
|
|
traefik.backend: "guacamole"
|
|
traefik.frontend.rule: "Host:guacamole.{{ ansible_nas_domain }}"
|
|
traefik.enable: "{{ guacamole_available_externally }}"
|
|
traefik.port: "8080" |