update..
This commit is contained in:
parent
be936fc8da
commit
6ccc932df9
@ -119,6 +119,7 @@
|
|||||||
- nis-install
|
- nis-install
|
||||||
- nis-install-server
|
- nis-install-server
|
||||||
|
|
||||||
|
|
||||||
# tags supported inside nfs.yml:
|
# tags supported inside nfs.yml:
|
||||||
#
|
#
|
||||||
# nis-install-client
|
# nis-install-client
|
||||||
@ -128,6 +129,7 @@
|
|||||||
- nis-install
|
- nis-install
|
||||||
- nis-install-client
|
- nis-install-client
|
||||||
|
|
||||||
|
|
||||||
# tags supported inside samba_user.yml:
|
# tags supported inside samba_user.yml:
|
||||||
#
|
#
|
||||||
# samba-user
|
# samba-user
|
||||||
@ -137,18 +139,6 @@
|
|||||||
- nis-samba-user
|
- nis-samba-user
|
||||||
|
|
||||||
|
|
||||||
- import_tasks: mount_samba_shares.yml
|
|
||||||
when: "groups['client_pc']|string is search(inventory_hostname)"
|
|
||||||
tags:
|
|
||||||
- samba-shares
|
|
||||||
|
|
||||||
|
|
||||||
- import_tasks: mount_samba_shares.yml
|
|
||||||
when: "groups['client_pc']|string is search(inventory_hostname)"
|
|
||||||
tags:
|
|
||||||
- samba-shares
|
|
||||||
|
|
||||||
|
|
||||||
# tags supported system-user-systemfiles.yml:
|
# tags supported system-user-systemfiles.yml:
|
||||||
#
|
#
|
||||||
# profile
|
# profile
|
||||||
@ -202,15 +192,48 @@
|
|||||||
- sudoers
|
- sudoers
|
||||||
|
|
||||||
|
|
||||||
|
# tags supported inside mount_samba_shares.yml:
|
||||||
|
#
|
||||||
|
- import_tasks: mount_samba_shares.yml
|
||||||
|
when: "groups['client_pc']|string is search(inventory_hostname)"
|
||||||
|
tags:
|
||||||
|
- samba-shares
|
||||||
|
|
||||||
|
|
||||||
|
# Tasks: Configure VNC (x11vnc) for Ubuntu systems
|
||||||
|
#
|
||||||
|
# Supported OS:
|
||||||
|
# - Ubuntu 16.04LTSi
|
||||||
|
# - Ubuntu 18.04LTSi
|
||||||
|
|
||||||
|
- name: "For OS: Ubuntu 16.04LTS, Arch: amd64"
|
||||||
|
import_tasks: ubuntu-x11vnc-1604-amd64.yml
|
||||||
|
when:
|
||||||
|
- ansible_distribution_version == "16.04"
|
||||||
|
- ansible_architecture == "x86_64"
|
||||||
|
tags:
|
||||||
|
- x11vnc
|
||||||
|
- x11vnc-1604
|
||||||
|
- finish-client-install
|
||||||
|
|
||||||
|
|
||||||
|
- name: "For OS: Ubuntu 18.04LTS, Arch: amd64"
|
||||||
|
import_tasks: ubuntu-x11vnc-1804-amd64.yml
|
||||||
|
when:
|
||||||
|
- ansible_distribution_version == "18.04"
|
||||||
|
- ansible_architecture == "x86_64"
|
||||||
|
tags:
|
||||||
|
- x11vnc
|
||||||
|
- x11vnc-1804
|
||||||
|
- finish-client-install
|
||||||
|
|
||||||
|
|
||||||
|
- name: "For OS: Ubuntu 20.04LTS, Arch: amd64"
|
||||||
|
import_tasks: ubuntu-x11vnc-2004-amd64.yml
|
||||||
|
when:
|
||||||
|
- ansible_distribution_version == "20.04"
|
||||||
|
- ansible_architecture == "x86_64"
|
||||||
|
tags:
|
||||||
|
- x11vnc
|
||||||
|
- x11vnc-2004
|
||||||
|
- finish-client-install
|
||||||
|
@ -179,7 +179,7 @@
|
|||||||
- name: (nis-install-client.yml) Adjust file /etc/nsswitch.conf (set hosts)
|
- name: (nis-install-client.yml) Adjust file /etc/nsswitch.conf (set hosts)
|
||||||
replace:
|
replace:
|
||||||
path: /etc/nsswitch.conf
|
path: /etc/nsswitch.conf
|
||||||
regexp: '(hosts:\s+files)\s+([^nis].*)'
|
regexp: '(hosts:\s+files)\s+((?!nis).*)$'
|
||||||
replace: '\1 nis \2'
|
replace: '\1 nis \2'
|
||||||
tags:
|
tags:
|
||||||
- nis-install
|
- nis-install
|
||||||
@ -188,7 +188,7 @@
|
|||||||
- name: (nis-install-client.yml) Adjust file /etc/nsswitch.conf (set passwd/group/shadow)
|
- name: (nis-install-client.yml) Adjust file /etc/nsswitch.conf (set passwd/group/shadow)
|
||||||
replace:
|
replace:
|
||||||
path: /etc/nsswitch.conf
|
path: /etc/nsswitch.conf
|
||||||
regexp: '^({{ item }}:\s+.*)'
|
regexp: '^({{ item }}:\s+((?!nis).)*)$'
|
||||||
replace: '\1 nis'
|
replace: '\1 nis'
|
||||||
with_items:
|
with_items:
|
||||||
- passwd
|
- passwd
|
||||||
|
55
roles/common/tasks/ubuntu-x11vnc-1604-amd64.yml
Normal file
55
roles/common/tasks/ubuntu-x11vnc-1604-amd64.yml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
# 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-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
|
||||||
|
|
61
roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml
Normal file
61
roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
# 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) get numeric id for group 'gdm'"
|
||||||
|
shell: echo "$(id -u gdm)"
|
||||||
|
register: grp_id_gdm
|
||||||
|
|
||||||
|
- name: Check if file '/etc/gdm3/custom.conf' exists
|
||||||
|
stat:
|
||||||
|
path: /etc/gdm3/custom.conf
|
||||||
|
register: etc_gdm_custom_conf_exists
|
||||||
|
|
||||||
|
- name: Adjust file '/etc/gdm3/custom.conf'
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/gdm3/custom.conf
|
||||||
|
state: present
|
||||||
|
regexp: '^WaylandEnable'
|
||||||
|
line: 'WaylandEnable=false'
|
||||||
|
insertafter: '^#?\s*WaylandEnable'
|
||||||
|
when:
|
||||||
|
- etc_gdm_custom_conf_exists.stat.exists
|
||||||
|
|
||||||
|
- 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-gdm3.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
|
||||||
|
|
69
roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml
Normal file
69
roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
---
|
||||||
|
# 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-2004-amd64.yml) Install packages"
|
||||||
|
apt:
|
||||||
|
name: "{{ packages }}"
|
||||||
|
update_cache: yes
|
||||||
|
state: present
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- x11vnc
|
||||||
|
|
||||||
|
- name: "(ubuntu-x11vnc-2004-amd64.yml) get numeric id for group 'gdm'"
|
||||||
|
shell: echo "$(id -u gdm)"
|
||||||
|
register: grp_id_gdm
|
||||||
|
|
||||||
|
- name: "(ubuntu-x11vnc-2004-amd64.yml) Store password"
|
||||||
|
raw: "x11vnc -storepasswd {{ vnc_password }} /etc/x11vnc.pass"
|
||||||
|
|
||||||
|
- name: Check if file '/etc/gdm3/custom.conf' exists
|
||||||
|
stat:
|
||||||
|
path: /etc/gdm3/custom.conf
|
||||||
|
register: etc_gdm_custom_conf_exists
|
||||||
|
|
||||||
|
- name: Adjust file '/etc/gdm3/custom.conf'
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/gdm3/custom.conf
|
||||||
|
state: present
|
||||||
|
regexp: '^WaylandEnable'
|
||||||
|
line: 'WaylandEnable=false'
|
||||||
|
insertafter: '^#?\s*WaylandEnable'
|
||||||
|
when:
|
||||||
|
- etc_gdm_custom_conf_exists.stat.exists
|
||||||
|
|
||||||
|
|
||||||
|
- name: "(ubuntu-x11vnc-2004-amd64.yml) Set permissions on /etc/x11vnc.pass"
|
||||||
|
file:
|
||||||
|
path: "/etc/x11vnc.pass"
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: "(ubuntu-x11vnc-2004-amd64.yml) Transfer x11vnc.service.j2 to /lib/systemd/system/x11vnc.service"
|
||||||
|
template:
|
||||||
|
src: lib/systemd/system/x11vnc-gdm3.service.j2
|
||||||
|
dest: /lib/systemd/system/x11vnc.service
|
||||||
|
|
||||||
|
- name: "(ubuntu-x11vnc-2004-amd64.yml) Enable service"
|
||||||
|
systemd:
|
||||||
|
name: x11vnc.service
|
||||||
|
daemon_reload: yes
|
||||||
|
enabled: yes
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
# - name: "(ubuntu-x11vnc-2004-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