From 3b2247346d03412c6d9cfd0ef5f0d4e30e2db3f5 Mon Sep 17 00:00:00 2001 From: Christian IUGA Date: Thu, 11 Jan 2024 12:06:11 +0100 Subject: [PATCH] add a set_fact when guacamole version is 1.5.4 and debian OS 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) }}'] ``` --- tasks/install.yml | 4 ++++ tasks/set_facts.yml | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/tasks/install.yml b/tasks/install.yml index f606e5a..42e4778 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -25,6 +25,8 @@ 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: @@ -32,6 +34,8 @@ 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: diff --git a/tasks/set_facts.yml b/tasks/set_facts.yml index 22c1d7d..58ed3e2 100644 --- a/tasks/set_facts.yml +++ b/tasks/set_facts.yml @@ -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"