2022-05-17 21:58:28 +00:00
|
|
|
---
|
|
|
|
- name: install required packages to build looking-glass
|
|
|
|
become: yes
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
|
|
|
pkg:
|
|
|
|
- binutils-dev
|
|
|
|
- cmake
|
|
|
|
- fonts-dejavu-core
|
|
|
|
- libfontconfig-dev
|
|
|
|
- gcc
|
|
|
|
- g++
|
|
|
|
- pkg-config
|
|
|
|
- libegl-dev
|
|
|
|
- libgl-dev
|
|
|
|
- libgles-dev
|
|
|
|
- libspice-protocol-dev
|
|
|
|
- nettle-dev
|
|
|
|
- libx11-dev
|
|
|
|
- libxcursor-dev
|
|
|
|
- libxi-dev
|
|
|
|
- libxinerama-dev
|
|
|
|
- libxpresent-dev
|
|
|
|
- libxss-dev
|
|
|
|
- libxkbcommon-dev
|
|
|
|
- libwayland-dev
|
|
|
|
- wayland-protocols
|
|
|
|
|
|
|
|
- name: create src dir
|
|
|
|
file:
|
|
|
|
path: "{{ ansible_user_dir }}/src"
|
|
|
|
|
|
|
|
- name: checkout looking glass
|
|
|
|
git:
|
|
|
|
repo: "{{ looking_glass.repo }}"
|
|
|
|
dest: "{{ ansible_user_dir }}/src/looking-glass"
|
|
|
|
version: "{{ looking_glass.branch }}"
|
|
|
|
clone: yes
|
|
|
|
update: yes
|
|
|
|
|
|
|
|
- name: create directory for build
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: "{{ ansible_user_dir }}/src/looking-glass/client/build"
|
|
|
|
|
|
|
|
- name: run cmake
|
|
|
|
shell:
|
|
|
|
cmd: "cmake ../"
|
|
|
|
chdir: "{{ ansible_user_dir }}/src/looking-glass/client/build"
|
|
|
|
|
|
|
|
- name: build
|
|
|
|
make:
|
|
|
|
chdir: "{{ ansible_user_dir }}/src/looking-glass/client/build"
|
|
|
|
|
|
|
|
- name: copy
|
|
|
|
become: yes
|
|
|
|
copy:
|
2022-05-19 17:46:23 +00:00
|
|
|
src: "{{ ansible_user_dir }}/src/looking-glass/client/build/looking-glass-client"
|
|
|
|
remote_src: yes
|
2022-05-17 21:58:28 +00:00
|
|
|
dest: "/usr/local/bin/looking-glass-client"
|
|
|
|
mode: "0755"
|
|
|
|
force: yes
|
|
|
|
|
|
|
|
- name: enable looking glass to access shared memory file
|
|
|
|
become: yes
|
|
|
|
copy:
|
|
|
|
src: etc/apparmor.d/local/abstractions/libvirt-qemu
|
|
|
|
dest: /etc/apparmor.d/local/abstractions/libvirt-qemu
|
|
|
|
|
|
|
|
- name: restart apparmor
|
|
|
|
become: yes
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: apparmor
|
|
|
|
state: restarted
|
|
|
|
daemon_reload: yes
|
|
|
|
|
|
|
|
- name: set user permission to access shared memory file
|
|
|
|
become: yes
|
|
|
|
copy:
|
|
|
|
src: etc/tmpfiles.d/10-looking-glass.conf
|
|
|
|
dest: /etc/tmpfiles.d/10-looking-glass.conf
|