Compare commits

...

2 Commits

Author SHA1 Message Date
09ddb17aa0 update.. 2023-04-13 02:07:58 +02:00
1546d9e5c5 update.. 2023-04-13 01:51:29 +02:00
12 changed files with 2465 additions and 1150 deletions

View File

@ -613,7 +613,7 @@ apt_initial_install_xenial:
- ifupdown
- socat
apt_initial_install_bionic:
apt_initial_install_jammy:
- apt-transport-https
- dbus
- openssh-server
@ -643,7 +643,8 @@ apt_initial_install_bionic:
- lynx
- links
- w3m
- ctags
- exuberant-ctags
- universal-ctags
- mime-support
- file
- coreutils
@ -666,7 +667,7 @@ apt_initial_install_bionic:
- librecode-dev
- sharutils
- perl
- perl-modules-5.26
- perl-modules
- perl-doc
- libperl-dev
- libterm-readline-gnu-perl
@ -752,6 +753,8 @@ apt_remove_xenial: []
apt_remove_bionic: []
apt_remove_jammy: []
apt_remove_purge: false

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -116,6 +116,16 @@
tags:
- apt-initial-install
- name: (apt.yml) Initial install ubuntu packages (jammy)
apt:
name: "{{ apt_initial_install_jammy }}"
state: "{{ apt_install_state }}"
when:
- ansible_facts['distribution'] == "Ubuntu"
- ansible_facts['distribution_release'] == "jammy"
tags:
- apt-initial-install
# ---
# Microcode
@ -223,6 +233,35 @@
- apt-initial-install
- apt-microcode
- name: (apt.yml) Install CPU microcode for Intel CPU (ubuntu jammy)
apt:
name: "{{ microcode_intel_package }}"
state: present
default_release: "{{ ansible_distribution_release }}"
when:
- ansible_facts['distribution'] == "Ubuntu"
- ansible_facts['distribution_release'] == "jammy"
- ansible_facts['processor']|string is search("Intel")
tags:
- apt-initial-install
- apt-microcode
- name: (apt.yml) Install CPU microcode for Intel AMD (ubuntu jammy)
apt:
name: "{{ microcode_amd_package }}"
state: present
default_release: "{{ ansible_distribution_release }}"
when:
- apt_debian_contrib_nonfree_enable
- ansible_facts['distribution'] == "Ubuntu"
- ansible_facts['distribution_release'] == "jammy"
- ansible_facts['processor']|string is search("AMD")
tags:
- apt-initial-install
- apt-microcode
# ---
# Firmware
# ---
@ -298,6 +337,17 @@
tags:
- apt-remove
- name: (apt.yml) Remove unwanted packages Ubuntu jammy
apt:
name: "{{ apt_remove_jammy }}"
state: absent
purge: "{{ apt_remove_purge }}"
when:
- ansible_facts['distribution'] == "Ubuntu"
- ansible_facts['distribution_release'] == "jammy"
tags:
- apt-remove
- name: (apt.yml) autoremove
apt:
autoremove: true

View File

@ -252,6 +252,17 @@
- finish-client-install
- name: "For OS: Ubuntu 22.04LTS, Arch: amd64"
import_tasks: ubuntu-x11vnc-2204-amd64.yml
when:
- ansible_distribution_version == "22.04"
- ansible_architecture == "x86_64"
tags:
- x11vnc
- x11vnc-2204
- finish-client-install
#- name: "Configure LUKS"
# import_tasks: luks.yml

View File

@ -14,15 +14,15 @@
when:
- item.is_samba_user is defined and item.is_samba_user|bool
- name: (mount_samba_shares.yml) Ensure (user separated) mount directories for samba shares exists
file:
path: "/mnt/{{ item.1 }}/{{ item.0.name }}"
owner: "{{ item.1 }}"
group: "{{ item.1 }}"
mode: '0770'
state: directory
with_subelements:
- "{{ samba_shares }}"
- user
loop_control:
label: '{{ item.1 }} share: {{ item.0.name }}'
#- name: (mount_samba_shares.yml) Ensure (user separated) mount directories for samba shares exists
# file:
# path: "/mnt/{{ item.1 }}/{{ item.0.name }}"
# owner: "{{ item.1 }}"
# group: "{{ item.1 }}"
# mode: '0770'
# state: directory
# with_subelements:
# - "{{ samba_shares }}"
# # - user
# loop_control:
# label: '{{ item.1 }} share: {{ item.0.name }}'

View File

@ -22,11 +22,17 @@
tags:
- sudoers-global-configuration
#- name: (sudoers-pc.yml) Ensure all sudo_users are in sudo group
# user:
# name: "{{ item }}"
# groups: sudo
# append: yes
# with_items: "{{ sudo_pc_users }}"
# tags:
# - sudo-users
- name: (sudoers-pc.yml) Ensure all sudo_users are in sudo group
user:
name: "{{ item }}"
groups: sudo
append: yes
shell: usermod -a -G sudo "{{ item }}"
with_items: "{{ sudo_pc_users }}"
tags:
- sudo-users

View File

@ -49,7 +49,7 @@
- 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
src: lib/systemd/system/x11vnc-gdm3.service-ALT.j2
dest: /lib/systemd/system/x11vnc.service
- name: "(ubuntu-x11vnc-1804-amd64.yml) Enable service"

View File

@ -52,7 +52,7 @@
- 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
src: lib/systemd/system/x11vnc-gdm3.service-ALT.j2
dest: /lib/systemd/system/x11vnc.service
- name: "(ubuntu-x11vnc-2004-amd64.yml) Enable service"

View File

@ -0,0 +1,71 @@
---
# 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-2204-amd64.yml) Install packages"
apt:
name: "{{ packages }}"
update_cache: yes
state: present
vars:
packages:
- x11vnc
- name: "(ubuntu-x11vnc-2204-amd64.yml) get numeric id for group 'gdm'"
shell: echo "$(id -u gdm)"
register: grp_id_gdm
- name: "(ubuntu-x11vnc-2204-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-2204-amd64.yml) Set permissions on /etc/x11vnc.pass"
file:
path: /etc/x11vnc.pass
owner: root
group: root
mode: 0644
- name: "(ubuntu-x11vnc-2204-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-2204-amd64.yml) Enable service"
systemd:
name: x11vnc.service
daemon_reload: yes
enabled: yes
state: restarted
# - name: "(ubuntu-x11vnc-2204-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

View File

@ -0,0 +1,11 @@
# {{ ansible_managed }}
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -loop -forever -bg -rfbport 5900 -xkb -noxrecord -noxfixes -noxdamage -shared -norc -auth /run/user/{{ grp_id_gdm.stdout }}/gdm/Xauthority -rfbauth /etc/x11vnc.pass
[Install]
WantedBy=multi-user.target

View File

@ -4,6 +4,7 @@ Description=Start x11vnc at startup.
After=multi-user.target
[Service]
User=gdm
Type=simple
ExecStart=/usr/bin/x11vnc -loop -forever -bg -rfbport 5900 -xkb -noxrecord -noxfixes -noxdamage -shared -norc -auth /run/user/{{ grp_id_gdm.stdout }}/gdm/Xauthority -rfbauth /etc/x11vnc.pass