Skip to content

Commit

Permalink
Merge pull request #29 from roumano/guacd
Browse files Browse the repository at this point in the history
Add a new tasks to (optional) configure guacd daemon
  • Loading branch information
mrlesmithjr authored Jul 27, 2023
2 parents ce31bcb + c8818c8 commit c5bd6b9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
- /etc/guacamole/lib
- /etc/guacamole/extensions

- name: config | Configuring guacd
ansible.builtin.template:
src: etc/guacamole/guacd.conf.j2
dest: /etc/guacamole/guacd.conf
owner: "{{ guacamole_tomcat_user }}"
group: "{{ guacamole_tomcat_user }}"
mode: u=rw,g=r,o=r
become: true
notify:
- kill guacd
- restart guacd
when: guacd_config is defined

- name: config | Configuring guacamole.properties
ansible.builtin.template:
src: etc/guacamole/guacamole.properties.j2
Expand Down
29 changes: 29 additions & 0 deletions templates/etc/guacamole/guacd.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% if guacd_config.daemon is defined %}
[daemon]
{% if guacd_config.daemon.pid_file is defined %}
pid_file = {{ guacd_config.daemon.pid_file }}
{% endif %}
{% if guacd_config.daemon.log_level is defined %}
log_level = {{ guacd_config.daemon.log_level }}
{% endif %}
{% endif %}

{% if guacd_config.server is defined %}
[server]
{% if guacd_config.server.bind_host is defined %}
bind_host = {{ guacd_config.server.bind_host }}
{% endif %}
{% if guacd_config.server.bind_port is defined %}
bind_port = {{ guacd_config.server.bind_port }}
{% endif %}
{% endif %}

{% if guacd_config.ssl is defined %}
[ssl]
{% if guacd_config.ssl.server_certificate is defined %}
server_certificate = {{ guacd_config.ssl.server_certificate }}
{% endif %}
{% if guacd_config.ssl.server_key is defined %}
server_key = {{ guacd_config.ssl.server_key }}
{% endif %}
{% endif %}

0 comments on commit c5bd6b9

Please sign in to comment.