Update..
This commit is contained in:
63
roles/common/tasks/ubuntu-x11vnc-1604-amd64.yml
Normal file
63
roles/common/tasks/ubuntu-x11vnc-1604-amd64.yml
Normal file
@ -0,0 +1,63 @@
|
||||
# Title: app-x11vnc-server
|
||||
#
|
||||
# Author: Luc Rutten
|
||||
# Version: 1.0
|
||||
# File: tasks/main.yml
|
||||
#
|
||||
# Description:
|
||||
# Remote support
|
||||
#
|
||||
# Source:
|
||||
# - http://c-nergy.be/blog/?p=8984
|
||||
|
||||
- name: "(ubuntu-x11vnc-1604-amd64.yml) check if x11vnc is already installed, if not found skipping...."
|
||||
stat:
|
||||
path: /usr/bin/x11vnc
|
||||
register: x11vnc_active
|
||||
|
||||
- name: "(ubuntu-x11vnc-1604-amd64.yml) Install packages"
|
||||
apt:
|
||||
name: ['x11vnc']
|
||||
update_cache: yes
|
||||
state: present
|
||||
when: x11vnc_active.stat.exists == False
|
||||
|
||||
- name: "(ubuntu-x11vnc-1804-amd64.yml) Install packages"
|
||||
apt:
|
||||
name: "{{ packages }}"
|
||||
update_cache: yes
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
- x11vnc
|
||||
|
||||
- name: "(ubuntu-x11vnc-1604-amd64.yml) Store password"
|
||||
shell: "x11vnc -storepasswd {{ vnc_password }} /etc/x11vnc.pass"
|
||||
|
||||
- name: "(ubuntu-x11vnc-1604-amd64.yml) Set permissions on /etc/x11vnc.pass"
|
||||
file:
|
||||
path: /etc/x11vnc.pass
|
||||
mode: 0644
|
||||
|
||||
- name: "(ubuntu-x11vnc-1604-amd64.yml) Transfer x11vnc.service.j2 to /lib/systemd/system/x11vnc.service"
|
||||
template:
|
||||
src: lib/systemd/system/x11vnc.service.j2
|
||||
dest: /lib/systemd/system/x11vnc.service
|
||||
|
||||
- name: "(ubuntu-x11vnc-1604-amd64.yml) Start x11vnc service"
|
||||
shell: service x11vnc start
|
||||
|
||||
- name: "(ubuntu-x11vnc-1604-amd64.yml) Enable x11vnc service on boot"
|
||||
systemd:
|
||||
name: x11vnc.service
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
- name: "(ubuntu-x11vnc-1604-amd64.yml) Blocks x11vnc in GreenOS Desktop Environment for enduser "
|
||||
file:
|
||||
path: "/usr/share/applications/x11vnc.desktop"
|
||||
mode: 0740
|
||||
owner: root
|
||||
group: administrator
|
||||
|
Reference in New Issue
Block a user