Skip to content

Commit

Permalink
add a set_fact when guacamole version is 1.5.4 and debian OS
Browse files Browse the repository at this point in the history
it's will set a environment to permit compile guacamole

if the env is enable on old version (like 1.5.3), it's failed to compile
sadly it's produce a warning on ansible-playbook :
```
[WARNING]: could not parse environment value, skipping: ['{{ guacamole_compile_environment | default(omit) }}']
```
  • Loading branch information
Christian IUGA committed Jan 11, 2024
1 parent ce9c62f commit 3b22473
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@
become: true
register: _guacamole_config_server_build
when: not _guacamole_server_installed['stat']['exists'] or extract.changed
# Workarround for this bug in 1.5.4 : https://lists.apache.org/thread/h5zql3zdov0ngh8kp9r3yppcprq5z1jf
environment: "{{ guacamole_compile_environment | default(omit) }}"

- name: install | Compiling Guacamole Server # noqa no-handler
community.general.make:
chdir: "{{ guacamole_src_dir + '/guacamole-server-' + guacamole_version }}"
become: true
register: _guacamole_server_compiled
when: _guacamole_config_server_build['changed']
# Workarround for this bug in 1.5.4 : https://lists.apache.org/thread/h5zql3zdov0ngh8kp9r3yppcprq5z1jf
environment: "{{ guacamole_compile_environment | default(omit) }}"

- name: install | Installing Guacamole Server # noqa no-handler
community.general.make:
Expand Down
9 changes: 9 additions & 0 deletions tasks/set_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,12 @@
- uuid-devel
when:
- ansible_os_family == "RedHat"

- name: set_facts | Fix guacamole 1.5.4 compile issue
ansible.builtin.set_fact:
guacamole_compile_environment:
LDFLAGS: '-lrt'
when:
- ansible_distribution == "Debian"
- ansible_distribution_version is version('9', '>=')
- guacamole_version == "1.5.4"

0 comments on commit 3b22473

Please sign in to comment.