update..
This commit is contained in:
parent
82dca4a02c
commit
19357fd440
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=x11vnc -rfbport -rfbauth /etc/x11vnc.pass
|
||||
Hidden=false
|
||||
NoDisplay=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
Name[de_DE]=X11VNC User-Service
|
||||
Name=X11VNC User-Service
|
||||
Comment[de_DE]=
|
||||
Comment=
|
@ -88,3 +88,88 @@
|
||||
- system-user
|
||||
|
||||
|
||||
- name: (nis_user.yml) Check if directory ~/.config/autostart exists
|
||||
stat:
|
||||
path: '{{ nis_base_home }}/{{ item.name }}/.config/autostart'
|
||||
loop: "{{ nis_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
register: home_config_autostart
|
||||
tags:
|
||||
- nis-user
|
||||
- x11vnc
|
||||
|
||||
|
||||
- name: (nis_user.yml) Ensure directory ~/.config/autostart if not exists
|
||||
file:
|
||||
path: '{{ nis_base_home }}/{{ item.item.name }}/.config/autostart'
|
||||
state: directory
|
||||
owner: "{{ item.item.name }}"
|
||||
group: "{{ item.item.name }}"
|
||||
mode: 0700
|
||||
recurse: yes
|
||||
loop: "{{ home_config_autostart.results }}"
|
||||
loop_control:
|
||||
label: '{{ item.item.name }}'
|
||||
when : not item.stat.exists|bool
|
||||
tags:
|
||||
- nis-user
|
||||
- x11vnc
|
||||
|
||||
|
||||
#- name: (nis_user.yml) Ensure directory ~/.config/autostart if not exists
|
||||
# file:
|
||||
# path: '{{ nis_base_home }}/{{ item.name }}/.config/autostart'
|
||||
# state: directory
|
||||
# owner: "{{ item.name }}"
|
||||
# group: "{{ item.name }}"
|
||||
# mode: 0700
|
||||
# recurse: yes
|
||||
# loop: "{{ nis_user }}"
|
||||
# loop_control:
|
||||
# label: '{{ item.name }}'
|
||||
# tags:
|
||||
# - nis-user
|
||||
# - x11vnc
|
||||
|
||||
|
||||
- name: (nis_user.yml) Check if file ~/.config/autostart/x11vnc.desktop exists
|
||||
stat:
|
||||
path: '{{ nis_base_home }}/{{ item.name }}/.config/autostart/x11vnc.desktop'
|
||||
loop: "{{ nis_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
register: home_config_autostart_x11vnc
|
||||
tags:
|
||||
- nis-user
|
||||
- x11vnc
|
||||
|
||||
- name: (nis_user.yml) Ensure file ~/.config/autostart/x11vnc.desktop exists
|
||||
copy:
|
||||
src: "{{ role_path + '/files/USER_HOME/.config/autostart/x11vnc.desktop' }}"
|
||||
dest: '{{ nis_base_home }}/{{ item.item.name }}/.config/autostart/x11vnc.desktop'
|
||||
owner: '{{ item.item.name }}'
|
||||
group: '{{ item.item.name }}'
|
||||
mode: 0600
|
||||
loop: "{{ home_config_autostart_x11vnc.results }}"
|
||||
loop_control:
|
||||
label: '{{ item.item.name }}'
|
||||
tags:
|
||||
- nis-user
|
||||
- x11vnc
|
||||
|
||||
#- name: (nis_user.yml) Ensure file ~/.config/autostart/x11vnc.desktop exists
|
||||
# copy:
|
||||
# src: "{{ role_path + '/files/USER_HOME/.config/autostart/x11vnc.desktop' }}"
|
||||
# dest: '{{ nis_base_home }}/{{ item.name }}/.config/autostart/x11vnc.desktop'
|
||||
# owner: '{{ item.name }}'
|
||||
# group: '{{ item.name }}'
|
||||
# mode: 0600
|
||||
# loop: "{{ nis_user }}"
|
||||
# loop_control:
|
||||
# label: '{{ item.name }}'
|
||||
# tags:
|
||||
# - nis-user
|
||||
# - x11vnc
|
||||
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
# Title: app-x11vnc-server
|
||||
#
|
||||
# Author: Luc Rutten
|
||||
@ -22,15 +23,6 @@
|
||||
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"
|
||||
|
||||
|
@ -36,13 +36,7 @@
|
||||
- name: "(ubuntu-x11vnc-1804-amd64.yml) Enable service"
|
||||
systemd:
|
||||
name: x11vnc.service
|
||||
enabled: true
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: restarted
|
||||
|
||||
- name: "(ubuntu-x11vnc-1804-amd64.yml) Remove whisker menu entry for allusers (except owner and group)"
|
||||
file:
|
||||
path: "/usr/share/applications/x11vnc.desktop"
|
||||
mode: 0750
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
|
49
roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml
Normal file
49
roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml
Normal file
@ -0,0 +1,49 @@
|
||||
---
|
||||
# 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-1804-amd64.yml) Install packages"
|
||||
apt:
|
||||
name: "{{ packages }}"
|
||||
update_cache: yes
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
- x11vnc
|
||||
|
||||
- name: "(ubuntu-x11vnc-1804-amd64.yml) Store password"
|
||||
raw: "x11vnc -storepasswd {{ vnc_password }} /etc/x11vnc.pass"
|
||||
|
||||
- name: "(ubuntu-x11vnc-1804-amd64.yml) Set permissions on /etc/x11vnc.pass"
|
||||
file:
|
||||
path: "/etc/x11vnc.pass"
|
||||
mode: 0644
|
||||
|
||||
- name: "(ubuntu-x11vnc-1804-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-1804-amd64.yml) Enable service"
|
||||
systemd:
|
||||
name: x11vnc.service
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: restarted
|
||||
|
||||
# - name: "(ubuntu-x11vnc-1804-amd64.yml) Remove whisker menu entry for allusers (except owner and group)"
|
||||
# file:
|
||||
# path: "/usr/share/applications/x11vnc.desktop"
|
||||
# mode: 0750
|
||||
# owner: root
|
||||
# group: root
|
||||
|
Loading…
Reference in New Issue
Block a user