67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
---
|
|
# 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...."
|
|
ansible.builtin.stat:
|
|
path: /usr/bin/x11vnc
|
|
register: common_x11vnc_active
|
|
|
|
- name: "(ubuntu-x11vnc-1604-amd64.yml) Install packages"
|
|
ansible.builtin.apt:
|
|
name: ['x11vnc']
|
|
update_cache: true
|
|
state: present
|
|
when: not common_x11vnc_active.stat.exists
|
|
|
|
- name: "(ubuntu-x11vnc-1604-amd64.yml) Store password"
|
|
ansible.builtin.command: x11vnc -storepasswd {{ vnc_password }} /etc/x11vnc.pass
|
|
changed_when: true
|
|
|
|
- name: "(ubuntu-x11vnc-1604-amd64.yml) Set permissions on /etc/x11vnc.pass"
|
|
ansible.builtin.file:
|
|
path: /etc/x11vnc.pass
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
state: file
|
|
|
|
- name: "(ubuntu-x11vnc-1604-amd64.yml) Transfer x11vnc.service.j2 to /lib/systemd/system/x11vnc.service"
|
|
ansible.builtin.template:
|
|
src: lib/systemd/system/x11vnc.service.j2
|
|
dest: /lib/systemd/system/x11vnc.service
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
|
|
# - name: "(ubuntu-x11vnc-1604-amd64.yml) Start x11vnc service"
|
|
# shell: service x11vnc start
|
|
|
|
- name: (ubuntu-x11vnc-1604-amd64.yml) Start x11vnc service
|
|
ansible.builtin.service:
|
|
name: x11vnc
|
|
state: started
|
|
|
|
- name: "(ubuntu-x11vnc-1604-amd64.yml) Enable x11vnc service on boot"
|
|
ansible.builtin.systemd:
|
|
name: x11vnc.service
|
|
daemon_reload: true
|
|
enabled: true
|
|
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
|