2018-11-19 22:58:06 +00:00
|
|
|
---
|
|
|
|
- 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:
|
2019-07-03 22:00:56 +00:00
|
|
|
MYSQL_DATABASE: "guacamole"
|
|
|
|
MYSQL_USER: "guacamole-user"
|
|
|
|
MYSQL_PASSWORD: "guacamole-pass"
|
|
|
|
MYSQL_ROOT_PASSWORD: "guacamole-secret"
|
2018-11-19 22:58:06 +00:00
|
|
|
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:
|
|
|
|
- "8090:8080"
|
|
|
|
env:
|
2019-07-03 22:00:56 +00:00
|
|
|
MYSQL_DATABASE: "guacamole"
|
|
|
|
MYSQL_USER: "guacamole-user"
|
|
|
|
MYSQL_PASSWORD: "guacamole-pass"
|
2019-04-11 22:03:11 +00:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
2018-11-25 11:07:44 +00:00
|
|
|
labels:
|
|
|
|
traefik.backend: "guacamole"
|
|
|
|
traefik.frontend.rule: "Host:guacamole.{{ ansible_nas_domain }}"
|
2019-04-11 22:03:11 +00:00
|
|
|
traefik.enable: "{{ guacamole_available_externally }}"
|
2018-11-25 11:07:44 +00:00
|
|
|
traefik.port: "8080"
|