Skip to content
Snippets Groups Projects
Commit a470594d authored by Michal Urban's avatar Michal Urban
Browse files

Merge branch 'replace-guacd-apt-installation-with-compilation' into 'master'

Replace guacd apt installation with compilation

See merge request muni-kypo-crp/backend-python/ansible-networking-stage/kypo-ansible-stage-one!32
parents 2381bc9c e58d03ec
No related branches found
Tags v1.0.10
No related merge requests found
...@@ -40,24 +40,53 @@ ...@@ -40,24 +40,53 @@
stat: path=/etc/init.d/guacd stat: path=/etc/init.d/guacd
register: guacd_status register: guacd_status
- set_fact:
error: "no"
- name: Install guacd block - name: Install guacd block
block: block:
- name: Install guacd - name: Install guacd
apt: apt:
name: guacd name: guacd
register: result
- set_fact:
error: "yes"
when: result.failed
- name: Change default listening address of guacd - name: Change default listening address of guacd
lineinfile: lineinfile:
path: /etc/default/guacd path: /etc/default/guacd
regexp: LISTEN_ADDRESS=.* regexp: LISTEN_ADDRESS=.*
line: LISTEN_ADDRESS={{ hostvars["man"]["kypo_global_sandbox_ip"] }} line: LISTEN_ADDRESS={{ hostvars["man"]["kypo_global_sandbox_ip"] }}
when: not error
- name: Restart guacd.service - name: Restart guacd.service
systemd: systemd:
state: restarted state: restarted
daemon_reload: yes daemon_reload: yes
name: guacd name: guacd
when: not error
when: not guacd_status.stat.exists when: not guacd_status.stat.exists
ignore_errors: yes
- name: Fallback - Install guacd on man and start it (source code compilation)
shell: |
sudo apt-get update
sudo apt-get install -y make gcc g++ libcairo2-dev libjpeg62-turbo-dev libpng-dev libtool-bin uuid-dev libossp-uuid-dev libavcodec-dev libavutil-dev libswscale-dev libpango1.0-dev libssh2-1-dev libvncserver-dev libtelnet-dev libssl-dev libvorbis-dev libwebp-dev libpulse-dev libwebsockets-dev freerdp2-dev
sudo wget https://dlcdn.apache.org/guacamole/1.4.0/source/guacamole-server-1.4.0.tar.gz -P /tmp/
sudo tar -xzf /tmp/guacamole-server-1.4.0.tar.gz -C /opt
sudo rm /tmp/guacamole-server-1.4.0.tar.gz
cd /opt/guacamole-server-1.4.0
sudo /opt/guacamole-server-1.4.0/configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots
sudo make
sudo make install
sudo ldconfig
sudo sed -i 's/getpid > \/dev\/null || $exec -p "$pidfile"/getpid > \/dev\/null || $exec -p "$pidfile" -b 0.0.0.0/' /etc/init.d/guacd
sudo systemctl daemon-reload
sudo systemctl start guacd
sudo systemctl enable guacd
when: (not guacd_status.stat.exists) and error
- name: NAT on MAN node - name: NAT on MAN node
hosts: man hosts: man
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment