Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

war file with version #45

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions tasks/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,40 @@
- name: client | Downloading Guacamole Client Package # noqa risky-file-permissions
ansible.builtin.get_url:
url: "{{ guacamole_dl_url + '/binary/' + guacamole_client_package }}"
dest: /etc/guacamole/guacamole.war
dest: "{{ '/etc/guacamole/guacamole-' + guacamole_version + '.war' }}"
become: true
register: dl
until: dl is success

- name: client | Creating Tomcat Symlink For {{ 'guacamole-' + guacamole_version + '.war' }}
ansible.builtin.file:
src: /etc/guacamole/guacamole.war
dest: "{{ '/var/lib/' + guacamole_tomcat + '/webapps/guacamole.war' }}"
src: "{{ '/etc/guacamole/guacamole-' + guacamole_version + '.war' }}"
dest: "{{ '/var/lib/' + guacamole_tomcat + '/webapps/guacamole##' + guacamole_version + '.war' }}"
state: link
become: true
notify:
- "restart {{ guacamole_tomcat_service }}"
- kill guacd
- restart guacd
- name: client | list if any Previous guacamole deployed war
ansible.builtin.find:
paths: "{{ '/var/lib/' + guacamole_tomcat + '/webapps/' }}"
excludes: "{{ 'guacamole##' + guacamole_version + '.war' }}"
file_type: link
register: guacamole_previous_wars

- name: client | Delete previous guacamole deployed war
ansible.builtin.file:
path: "{{ guacamole_previous_war.path }}"
state: absent
loop: "{{ guacamole_previous_wars.files }}"
loop_control:
loop_var: guacamole_previous_war

# Moving here to ensure idempotency as it was failing when included above
- name: client | Setting Permissions On Tomcat Symlink For {{ 'guacamole-' + guacamole_version + '.war' }}
ansible.builtin.file:
path: /etc/guacamole/guacamole.war
path: "{{ '/etc/guacamole/guacamole-' + guacamole_version + '.war' }}"
owner: "{{ guacamole_tomcat_user }}"
group: "{{ guacamole_tomcat_user }}"
become: true
Loading