Update..
This commit is contained in:
parent
5aaee7646b
commit
ce14de76cf
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -15,9 +14,9 @@ locales:
|
||||
set_default_limit_nofile: false
|
||||
|
||||
|
||||
# ---
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/sshd.yml
|
||||
# ---
|
||||
# ==========
|
||||
|
||||
sshd_ports:
|
||||
- 22
|
||||
@ -73,7 +72,6 @@ sshd_use_dns: !!str "no"
|
||||
sshd_allowed_users: {}
|
||||
|
||||
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/apt.yml
|
||||
# ==========
|
||||
@ -698,41 +696,24 @@ nfs_exports:
|
||||
- src: 192.168.82.10:/data/home
|
||||
path: /data/home
|
||||
mount_opts: user,exec,rsize=8192,wsize=8192,hard,intr
|
||||
export_opt: rw,fsid=0,root_squash,sync,subtree_check
|
||||
export_opt: rw,root_squash,sync,subtree_check
|
||||
export_networks:
|
||||
- 192.168.82.0/24
|
||||
- 10.0.82.0/24
|
||||
- 10.1.82.0/24
|
||||
- 192.168.63.0/24
|
||||
fs_encrypted: false
|
||||
use_fsid_option: true
|
||||
|
||||
- src: 192.168.82.10:/data/samba
|
||||
path: /data/samba
|
||||
mount_opts: user,exec,rsize=8192,wsize=8192,hard,intr
|
||||
export_opt: rw,fsid=1,root_squash,sync,subtree_check
|
||||
export_opt: rw,root_squash,sync,subtree_check
|
||||
export_networks:
|
||||
- 192.168.82.0/24
|
||||
- 10.0.82.0/24
|
||||
- 10.1.82.0/24
|
||||
- 192.168.63.0/24
|
||||
fs_encrypted: false
|
||||
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/samba-install.yml
|
||||
# ==========
|
||||
|
||||
apt_install_server_samba:
|
||||
- samba
|
||||
- nscd
|
||||
|
||||
# - winbind
|
||||
|
||||
apt_install_client_samba:
|
||||
- samba-client
|
||||
- samba-common
|
||||
|
||||
samba_server: file-akb.akb.netz
|
||||
use_fsid_option: true
|
||||
|
||||
|
||||
# ==========
|
||||
@ -926,10 +907,8 @@ pureftpd_tls_certificate_openssl:
|
||||
# unit: ''
|
||||
|
||||
|
||||
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/user.yml
|
||||
# vars used by roles/common/tasks/system-user.yml
|
||||
# ==========
|
||||
|
||||
# ! Notice !
|
||||
@ -1122,6 +1101,42 @@ nis_user:
|
||||
password: '20-birgit_20%'
|
||||
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/samba-install.yml
|
||||
# ==========
|
||||
|
||||
apt_install_server_samba:
|
||||
- samba
|
||||
- nscd
|
||||
|
||||
# - winbind
|
||||
|
||||
apt_install_client_samba:
|
||||
- samba-client
|
||||
- samba-common
|
||||
|
||||
samba_server: file-akb.akb.netz
|
||||
|
||||
samba_cronjob_trash_dirs:
|
||||
name: Clean up Samba Trash Dirs
|
||||
minute: "11"
|
||||
hour: "23"
|
||||
day: "*"
|
||||
month: "*"
|
||||
weekday: '*'
|
||||
user: root
|
||||
job: "/root/bin/samba/clean_samba_trash.sh"
|
||||
|
||||
samba_cronjob_permissions:
|
||||
name: Set (group and access) Permissons for Samba shares
|
||||
minute: "0-59/30"
|
||||
hour: "*"
|
||||
day: "*"
|
||||
month: "*"
|
||||
weekday: '*'
|
||||
user: root
|
||||
job: "/root/bin/samba/set_permissions_samba_shares.sh"
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/samba-user.yml
|
||||
# ==========
|
||||
@ -1130,7 +1145,7 @@ nis_user:
|
||||
#
|
||||
# variables used from other previos sections:
|
||||
#
|
||||
# - remove_system_users: roles/common/tasks/user.yml
|
||||
# - remove_system_users: roles/common/tasks/system-user.yml
|
||||
# - remove_nis_users: roles/common/tasks/nis-install-server.yml
|
||||
# - nis_user: roles/common/tasks/nis-install-server.yml
|
||||
|
||||
@ -1145,11 +1160,19 @@ nis_user:
|
||||
#
|
||||
# - nis_user: roles/common/tasks/nis-install-server.yml
|
||||
|
||||
|
||||
samba_workgroup: AKB
|
||||
samba_netbios_name: FILE-AKB
|
||||
|
||||
samba_shares:
|
||||
- name: Transfer
|
||||
path: /data/samba/Transfer
|
||||
group_valid_users: transfer
|
||||
group_write_list: transfer
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- anna
|
||||
- buero
|
||||
@ -1165,6 +1188,10 @@ samba_shares:
|
||||
path: /data/samba/Verwaltung
|
||||
group_valid_users: verwaltung
|
||||
group_write_list: verwaltung
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- anna
|
||||
- jonas
|
||||
@ -1182,6 +1209,10 @@ samba_shares:
|
||||
path: /data/samba/Scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- anna
|
||||
- buero
|
||||
@ -1198,54 +1229,90 @@ samba_shares:
|
||||
path: /data/samba/Scans/Buero_Scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- buero
|
||||
- name: Frauke_Scans
|
||||
path: /data/samba/Scans/Frauke_Scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- frauke
|
||||
- name: FSJ_Scans
|
||||
path: /data/samba/Scans/FSJ_Scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- fsj
|
||||
- name: Jibran_Scans
|
||||
path: /data/samba/Scans/Jibran_Scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- jibran
|
||||
- name: Julia_Scans
|
||||
path: /data/samba/Scans/Julia_Scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- julia
|
||||
- name: Maica_scans
|
||||
path: /data/samba/Scans/Maica_scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- maica
|
||||
- name: Thomas_Scans
|
||||
path: /data/samba/Scans/Thomas_Scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- thomas
|
||||
- name: Birgit_Scans
|
||||
path: /data/samba/Scans/Birgit_Scans
|
||||
group_valid_users: scans
|
||||
group_write_list: scans
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: true
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- birgit
|
||||
- name: Kamera
|
||||
path: /data/samba/Kamera
|
||||
group_valid_users: intern
|
||||
group_write_list: intern
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: false
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- anna
|
||||
- buero
|
||||
@ -1259,6 +1326,10 @@ samba_shares:
|
||||
path: /data/samba/Install
|
||||
group_valid_users: intern
|
||||
group_write_list: intern
|
||||
file_create_mask: '0660'
|
||||
dir_create_mask: '2770'
|
||||
vfs_object_recycle: false
|
||||
recycle_path: '@Recycle.Bin'
|
||||
user:
|
||||
- anna
|
||||
- buero
|
||||
@ -1271,7 +1342,18 @@ samba_shares:
|
||||
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/user-systemfiles.yml
|
||||
# vars used by roles/common/tasks/system-user-systemfiles.yml
|
||||
# ==========
|
||||
|
||||
# ! Notice !
|
||||
#
|
||||
# variables used from other previos sections:
|
||||
#
|
||||
# - system_users: roles/common/tasks/system-user.yml
|
||||
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/nis-user-systemfiles.yml
|
||||
# ==========
|
||||
|
||||
# ! Notice !
|
||||
@ -1281,7 +1363,6 @@ samba_shares:
|
||||
# - nis_user: roles/common/tasks/nis-install-server.yml
|
||||
|
||||
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/sudoers-pc.yml
|
||||
# ==========
|
||||
@ -1329,7 +1410,6 @@ sudoers_pc_file_cmnd_aliases:
|
||||
sudoers_pc_file_runas_aliases: []
|
||||
|
||||
|
||||
|
||||
# ==========
|
||||
# vars used by roles/common/tasks/sudoers-server.yml
|
||||
# ==========
|
||||
@ -1410,6 +1490,9 @@ sudoers_server_file_user_privileges: []
|
||||
sudoers_server_file_group_privileges: []
|
||||
|
||||
|
||||
# ====================
|
||||
# ====================
|
||||
# ====================
|
||||
|
||||
# ==========
|
||||
# vars used by roles/ansible_dependencies
|
||||
|
@ -14,6 +14,7 @@
|
||||
tags:
|
||||
- apt-configuration
|
||||
|
||||
|
||||
- name: (apt.yml) apt update
|
||||
apt:
|
||||
update_cache: true
|
||||
@ -28,6 +29,7 @@
|
||||
- apt-compiler-pkgs
|
||||
- apt-webserver-pkgs
|
||||
|
||||
|
||||
- name: (apt.yml) dpkg --configure
|
||||
command: >
|
||||
dpkg --configure -a
|
||||
@ -43,6 +45,7 @@
|
||||
- apt-compiler-pkgs
|
||||
- apt-webserver-pkgs
|
||||
|
||||
|
||||
- name: (apt.yml) apt upgrade
|
||||
apt:
|
||||
upgrade: "{{ apt_upgrade_type }}"
|
||||
@ -56,6 +59,7 @@
|
||||
- apt-compiler-pkgs
|
||||
- apt-webserver-pkgs
|
||||
|
||||
|
||||
- name: (apt.yml) Initial install debian packages (stretch)
|
||||
apt:
|
||||
name: "{{ apt_initial_install_stretch }}"
|
||||
@ -66,6 +70,7 @@
|
||||
tags:
|
||||
- apt-initial-install
|
||||
|
||||
|
||||
- name: (apt.yml) Initial install debian packages (buster)
|
||||
apt:
|
||||
name: "{{ apt_initial_install_buster }}"
|
||||
@ -76,6 +81,7 @@
|
||||
tags:
|
||||
- apt-initial-install
|
||||
|
||||
|
||||
- name: (apt.yml) Initial install ubuntu packages (bionic)
|
||||
apt:
|
||||
name: "{{ apt_initial_install_bionic }}"
|
||||
@ -96,6 +102,7 @@
|
||||
tags:
|
||||
- apt-initial-install
|
||||
|
||||
|
||||
# ---
|
||||
# Microcode
|
||||
# ---
|
||||
@ -114,6 +121,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Ensure we have CPU microcode from backports for AMD CPU (debian stretch)
|
||||
apt:
|
||||
name: "{{ microcode_amd_package }}"
|
||||
@ -129,6 +137,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode for Intel CPU (debian buster)
|
||||
apt:
|
||||
name: "{{ microcode_intel_package }}"
|
||||
@ -142,6 +151,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode for AMD CPU (debian buster)
|
||||
apt:
|
||||
name: "{{ microcode_amd_package }}"
|
||||
@ -156,6 +166,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode for Intel CPU (ubuntu bionic)
|
||||
apt:
|
||||
name: "{{ microcode_intel_package }}"
|
||||
@ -169,6 +180,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode for AMD CPU (ubuntu bionic)
|
||||
apt:
|
||||
name: "{{ microcode_amd_package }}"
|
||||
@ -183,6 +195,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode for Intel CPU (ubuntu xenial)
|
||||
apt:
|
||||
name: "{{ microcode_intel_package }}"
|
||||
@ -196,6 +209,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode for Intel AMD (ubuntu xenial)
|
||||
apt:
|
||||
name: "{{ microcode_amd_package }}"
|
||||
@ -223,6 +237,7 @@
|
||||
- apt-initial-install
|
||||
- apt-firmware
|
||||
|
||||
|
||||
- name: (apt.yml) Install non-free Firmware packages
|
||||
apt:
|
||||
name: "{{ firmware_non_free_packages }}"
|
||||
@ -256,8 +271,6 @@
|
||||
- apt-autoremove
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
- apt-compiler-pkgs
|
||||
- apt-webserver-pkgs
|
||||
|
||||
- name: (apt.yml) clean
|
||||
command: apt-get -y clean
|
||||
@ -269,6 +282,3 @@
|
||||
- apt-clean
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
- apt-compiler-pkgs
|
||||
- apt-mysql-server-pkgs
|
||||
- apt-webserver-pkgs
|
||||
|
@ -14,6 +14,7 @@
|
||||
tags:
|
||||
- locales
|
||||
|
||||
|
||||
- name: (basic.yml) Create a symbolic link /bin/sh -> bash
|
||||
file:
|
||||
src: bash
|
||||
@ -26,6 +27,7 @@
|
||||
tags:
|
||||
- symlink-sh
|
||||
|
||||
|
||||
- name: (basic.yml) Check file '/etc/systemd/system.conf' exists
|
||||
stat:
|
||||
path: /etc/systemd/system
|
||||
@ -33,6 +35,7 @@
|
||||
when:
|
||||
- set_default_limit_nofile|bool == true
|
||||
|
||||
|
||||
- name: (basic.yml) Change DefaultLimitNOFILE to 1048576
|
||||
lineinfile:
|
||||
dest: /etc/systemd/system.conf
|
||||
@ -60,6 +63,7 @@
|
||||
tags:
|
||||
- limits-conf
|
||||
|
||||
|
||||
- name: (basic.yml) Create new sshd_config from template limits.conf.j2
|
||||
template:
|
||||
src: etc/security/limits.conf.j2
|
||||
@ -92,7 +96,7 @@
|
||||
- name: (basic.yml) addjust '/etc/hosts' add nis-server ..
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '^192\.168\.82\.'
|
||||
regexp: '^192\.168\.'
|
||||
line: '{{ nis_server_address }} {{ nis_server_name }} {{ nis_server_name.split(".")[0] }}'
|
||||
when:
|
||||
- "groups['nis_server']|string is search(inventory_hostname)"
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
# -- file /etc/cups/cups-browsed.conf
|
||||
- name: (cups.yml) Check if file '/etc/cups/cups-browsed.conf.ORIGi' exists
|
||||
- name: (cups.yml) Check if file '/etc/cups/cups-browsed.conf.ORIG' exists
|
||||
stat:
|
||||
path: /etc/cups/cups-browsed.conf.ORIG
|
||||
register: cups_browsed_conf_orig_exists
|
||||
|
6
roles/common/tasks/luks.yml
Normal file
6
roles/common/tasks/luks.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- name: (luks.ym) add new key to the LUKS container (container has to exist)
|
||||
luks_device:
|
||||
device: "{{ luks_device }}"
|
||||
keyfile: "{{ role_path + '/files/vault/luks_default_passwd' }}"
|
||||
new_keyfile: "{{ role_path + '/files/vault/luks_chris_passwd' }}"
|
||||
|
@ -47,6 +47,7 @@
|
||||
tags:
|
||||
- ntp
|
||||
|
||||
|
||||
# tags supported inside cups-install.yml:
|
||||
#
|
||||
# cups-server
|
||||
@ -55,7 +56,8 @@
|
||||
tags:
|
||||
- cups
|
||||
|
||||
# tags supported inside cups-install.yml:
|
||||
|
||||
# tags supported inside pure-ftpd-install.yml:
|
||||
#
|
||||
- import_tasks: pure-ftpd-install.yml
|
||||
when:
|
||||
@ -63,6 +65,7 @@
|
||||
tags:
|
||||
- pure-ftpd
|
||||
|
||||
|
||||
# tags supported inside nfs.yml:
|
||||
#
|
||||
# nfs-server
|
||||
@ -78,13 +81,21 @@
|
||||
# samba-client
|
||||
- import_tasks: samba-install.yml
|
||||
tags:
|
||||
- samba-install
|
||||
- samba
|
||||
|
||||
|
||||
# tags supported inside user.yml:
|
||||
# tags supported inside samba-remove-user.yml:
|
||||
#
|
||||
- import_tasks: samba-remove-user.yml
|
||||
tags:
|
||||
- samba-remove-user
|
||||
|
||||
|
||||
# tags supported inside system-user.yml:
|
||||
#
|
||||
# system-user
|
||||
- import_tasks: user.yml
|
||||
- import_tasks: system-user.yml
|
||||
when: "groups['file_server']|string is search(inventory_hostname)"
|
||||
tags:
|
||||
- system-user
|
||||
@ -102,7 +113,7 @@
|
||||
|
||||
# tags supported inside nis-user.yml:
|
||||
#
|
||||
# system-user
|
||||
# nis-user
|
||||
- import_tasks: nis-user.yml
|
||||
when: "groups['nis_server']|string is search(inventory_hostname)"
|
||||
tags:
|
||||
@ -127,6 +138,7 @@
|
||||
tags:
|
||||
- nis-samba-user
|
||||
|
||||
|
||||
# tags supported inside mount_samba_shares.yml:
|
||||
#
|
||||
- import_tasks: mount_samba_shares.yml
|
||||
@ -155,12 +167,13 @@
|
||||
when: "groups['nis_server']|string is search(inventory_hostname)"
|
||||
tags:
|
||||
- user-systemfiles
|
||||
- nis-user-systemfiles
|
||||
|
||||
|
||||
# tags supported root_files_scripts.yml:
|
||||
# tags supported root-files-scripts.yml:
|
||||
|
||||
# wakeup_lan
|
||||
- import_tasks: root_files_scripts.yml
|
||||
- import_tasks: root-files-scripts.yml
|
||||
tags:
|
||||
- root-files-scripts
|
||||
|
||||
@ -175,6 +188,7 @@
|
||||
tags:
|
||||
- sudoers
|
||||
|
||||
|
||||
# tags supported inside sudoers-server.yml:
|
||||
#
|
||||
# sudoers-remove
|
||||
@ -185,3 +199,37 @@
|
||||
tags:
|
||||
- sudoers
|
||||
|
||||
|
||||
# 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: "Configure LUKS"
|
||||
# import_tasks: luks.yml
|
||||
# when: "groups['client_pc']|string is search(inventory_hostname)"
|
||||
# tags:
|
||||
# - luks
|
||||
|
@ -12,11 +12,6 @@
|
||||
label: '{{ item.name }}'
|
||||
register: local_template_dir_nis_user
|
||||
|
||||
# root
|
||||
- name: (nis-user-systemfiles.yml) Check if local template directory exists for root
|
||||
local_action: stat path={{ inventory_dir }}/files/homedirs/root
|
||||
register: local_template_dir_root
|
||||
|
||||
|
||||
# --
|
||||
# Copy .profile
|
||||
@ -73,32 +68,6 @@
|
||||
tags:
|
||||
- profile
|
||||
|
||||
# -- root user
|
||||
- name: (nis-user-systemfiles.yml) Check if file '/root/.profile.ORIG' exists
|
||||
stat:
|
||||
path: /root/.profile.ORIG
|
||||
register: profile_root_orig_exists
|
||||
tags:
|
||||
- profile
|
||||
|
||||
- name: (nis-user-systemfiles.yml) Backup existing users .profile file
|
||||
command: cp -a /root/.profile /root/.profile.ORIG
|
||||
when: profile_root_orig_exists.stat.exists == False
|
||||
tags:
|
||||
- profile
|
||||
|
||||
- name: (nis-user-systemfiles.yml) copy .profile for user root
|
||||
copy:
|
||||
src: "{{ lookup('fileglob', inventory_dir + '/files/homedirs/root/_profile') }}"
|
||||
dest: "/root/.profile"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when:
|
||||
- local_template_dir_root.stat.exists
|
||||
- lookup('fileglob', inventory_dir + '/files/homedirs/root/_profile')
|
||||
tags:
|
||||
- profile
|
||||
|
||||
# --
|
||||
# Copy .bashrc
|
||||
@ -154,32 +123,6 @@
|
||||
tags:
|
||||
- bashrc
|
||||
|
||||
# -- root user
|
||||
- name: (nis-user-systemfiles.yml) Check if file '/root/.bashrc.ORIG' exists
|
||||
stat:
|
||||
path: /root/.bashrc.ORIG
|
||||
register: bashrc_root_orig_exists
|
||||
tags:
|
||||
- bash
|
||||
|
||||
- name: (nis-user-systemfiles.yml) Backup /root/.bashrc file
|
||||
command: cp /root/.bashrc /root/.bashrc.ORIG
|
||||
when: bashrc_root_orig_exists.stat.exists == False
|
||||
tags:
|
||||
- bash
|
||||
|
||||
- name: (nis-user-systemfiles.yml) copy .bashrc for user root
|
||||
copy:
|
||||
src: "{{ lookup('fileglob', inventory_dir + '/files/homedirs/root/_bashrc') }}"
|
||||
dest: "/root/.bashrc"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when:
|
||||
- local_template_dir_root.stat.exists
|
||||
- lookup('fileglob', inventory_dir + '/files/homedirs/root/_bashrc')
|
||||
tags:
|
||||
- bash
|
||||
|
||||
# --
|
||||
# Copy .vimrc
|
||||
@ -238,40 +181,3 @@
|
||||
tags:
|
||||
- vimrc
|
||||
|
||||
|
||||
- name: (nis-user-systemfiles.yml) copy .vimrc for user root
|
||||
copy:
|
||||
src: "{{ lookup('fileglob', inventory_dir + '/files/homedirs/root/_vimrc') }}"
|
||||
dest: "/root/.vimrc"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when:
|
||||
- local_template_dir_root.stat.exists
|
||||
- lookup('fileglob', inventory_dir + '/files/homedirs/root/_vimrc')
|
||||
tags:
|
||||
- vimrc
|
||||
|
||||
- name: (nis-user-systemfiles.yml) Check if local template directory .vim exists for user root
|
||||
local_action: stat path={{ inventory_dir }}/files/homedirs/root/.vim
|
||||
register: local_template_dir_vim_root
|
||||
with_items: 'root'
|
||||
loop_control:
|
||||
label: 'root'
|
||||
|
||||
- name: (nis-user-systemfiles.yml) copy .vim directory for user root if it exists
|
||||
copy:
|
||||
src: "{{ inventory_dir + '/files/homedirs/root/.vim' }}"
|
||||
dest: "/root"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: 0644
|
||||
with_items: "{{ local_template_dir_vim_root.results }}"
|
||||
loop_control:
|
||||
label: 'root'
|
||||
when:
|
||||
- item.stat.exists
|
||||
tags:
|
||||
- vim
|
||||
|
||||
|
||||
|
@ -48,25 +48,20 @@
|
||||
|
||||
#- meta: end_host
|
||||
|
||||
- name: (nis_user.yml) Check if nis (system) user exists
|
||||
shell: "getent passwd {{ item.name }}"
|
||||
register: nis_user_exists
|
||||
changed_when: "nis_user_exists.rc == 2"
|
||||
failed_when: "nis_user_exists.rc > 2"
|
||||
loop: "{{ nis_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
ignore_errors: true
|
||||
- name: (nis_user.yml) Get database of nis (system) users
|
||||
getent:
|
||||
database: passwd
|
||||
tags:
|
||||
- nis-user
|
||||
- system-user
|
||||
|
||||
- name: (nis_user.yml) Add nis (system) users
|
||||
- name: (nis_user.yml) Add nis (system) users if not yet exists..
|
||||
shell: "/root/bin/admin-stuff/add_new_user.sh {{ item.name }} '{{ item.password }}'"
|
||||
loop: "{{ nis_user }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: nis_user_exists is changed
|
||||
when:
|
||||
- item.name not in getent_passwd
|
||||
notify: Renew nis databases
|
||||
tags:
|
||||
- nis-user
|
||||
|
@ -11,7 +11,7 @@
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == "Debian"
|
||||
- "groups['file_server']|string is search(inventory_hostname)"
|
||||
- groups['file_server']|string is search(inventory_hostname)
|
||||
tags:
|
||||
- ntp-server
|
||||
|
||||
@ -20,14 +20,14 @@
|
||||
path: /etc/ntp.conf.ORIG
|
||||
register: etc_ntp_conf_ORIG
|
||||
when:
|
||||
- "groups['file_server']|string is search(inventory_hostname)"
|
||||
- groups['file_server']|string is search(inventory_hostname)
|
||||
tags:
|
||||
- ntp-server
|
||||
|
||||
- name: (ntp.yml) Backup installation version of file '/etc/ntp.conf'
|
||||
command: cp -a /etc/ntp.conf /etc/ntp.conf.ORIG
|
||||
when:
|
||||
- "groups['file_server']|string is search(inventory_hostname)"
|
||||
- groups['file_server']|string is search(inventory_hostname)
|
||||
- etc_ntp_conf_ORIG.stat.exists == False
|
||||
tags:
|
||||
- ntp-server
|
||||
|
@ -13,6 +13,20 @@
|
||||
tags:
|
||||
- samba-server
|
||||
|
||||
- name: (samba-install.yml) Ensure samba share directories exists
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
owner: "root"
|
||||
group: "{{ item.group_write_list }}"
|
||||
mode: '2770'
|
||||
state: directory
|
||||
with_items: "{{ samba_shares }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
tags:
|
||||
- samba-shares
|
||||
|
||||
|
||||
# ---
|
||||
# /etc/samba/smb.conf
|
||||
# ---
|
||||
@ -35,22 +49,6 @@
|
||||
- samba-server
|
||||
|
||||
|
||||
- name: (samba-install.yml) Ensure file /etc/samba/users.map exists
|
||||
copy:
|
||||
src: "{{ role_path + '/files//etc/samba/users.map' }}"
|
||||
dest: /etc/samba/users.map
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when:
|
||||
- "groups['samba_server']|string is search(inventory_hostname)"
|
||||
notify:
|
||||
- Restart smbd
|
||||
- Restart nmbd
|
||||
tags:
|
||||
- samba-server
|
||||
|
||||
|
||||
- name: (samba-install.yml) /etc/samba/smb.conf
|
||||
template:
|
||||
dest: /etc/samba/smb.conf
|
||||
@ -67,6 +65,106 @@
|
||||
- samba-server
|
||||
|
||||
|
||||
- name: (samba-install.yml) Ensure file /etc/samba/users.map exists
|
||||
copy:
|
||||
src: "{{ role_path + '/files/etc/samba/users.map' }}"
|
||||
dest: /etc/samba/users.map
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when:
|
||||
- "groups['samba_server']|string is search(inventory_hostname)"
|
||||
notify:
|
||||
- Restart smbd
|
||||
- Restart nmbd
|
||||
tags:
|
||||
- samba-server
|
||||
|
||||
|
||||
# ---
|
||||
# Cronjob for cleaning up samba trash dirs
|
||||
# ---
|
||||
|
||||
- name: (samba-install.yml) Check if file '/root/bin/samba/clean_samba_trash.sh' exists
|
||||
stat:
|
||||
path: /root/bin/samba/clean_samba_trash.sh
|
||||
register: clean_samba_trash_exists
|
||||
|
||||
- name: (samba-install.yml) Adjust configuration for script 'clean_samba_trash.sh'
|
||||
template:
|
||||
dest: /root/bin/samba/conf/clean_samba_trash.conf
|
||||
src: root/bin/samba/conf/clean_samba_trash.conf.j2
|
||||
when:
|
||||
- clean_samba_trash_exists.stat.exists|bool
|
||||
tags:
|
||||
- samba-server
|
||||
|
||||
|
||||
- name: Check if cleaning up trash dirs is configured
|
||||
lineinfile:
|
||||
path: /root/bin/samba/conf/clean_samba_trash.conf
|
||||
regexp: "^trash_dirs=*"
|
||||
state: absent
|
||||
check_mode: yes
|
||||
changed_when: false
|
||||
register: clean_samba_trash_dirs
|
||||
|
||||
- name: Creates a cron job for cleaning up samba trash dirs
|
||||
cron:
|
||||
name: '{{ samba_cronjob_trash_dirs.name }}'
|
||||
minute: '{{ samba_cronjob_trash_dirs.minute }}'
|
||||
hour: "{{ samba_cronjob_trash_dirs.hour | default('*') }}"
|
||||
day: "{{ samba_cronjob_trash_dirs.hour.day | default('*') }}"
|
||||
month: "{{ samba_cronjob_trash_dirs.hour.month| default('*') }}"
|
||||
weekday: "{{ samba_cronjob_trash_dirs.hour.weekday| default('*') }}"
|
||||
user: "{{ samba_cronjob_trash_dirs.user | default('root') }}"
|
||||
job: "{{ samba_cronjob_trash_dirs.job }}"
|
||||
when:
|
||||
- clean_samba_trash_dirs.found
|
||||
|
||||
|
||||
# ---
|
||||
# Cronjob for setting permissions on samba shares
|
||||
# ---
|
||||
|
||||
- name: (samba-install.yml) Check if file '/root/bin/samba/set_permissions_samba_shares.sh' exists
|
||||
stat:
|
||||
path: /root/bin/samba/set_permissions_samba_shares.sh
|
||||
register: set_permissions_on_samba_shares_exists
|
||||
|
||||
- name: (samba-install.yml) Adjust configuration for script 'set_permissions_samba_shares.sh'
|
||||
template:
|
||||
dest: /root/bin/samba/conf/set_permissions_samba_shares.conf
|
||||
src: root/bin/samba/conf/set_permissions_samba_shares.conf.j2
|
||||
when:
|
||||
- set_permissions_on_samba_shares_exists.stat.exists|bool
|
||||
tags:
|
||||
- samba-server
|
||||
|
||||
|
||||
- name: Check if cleaning up trash dirs is configured
|
||||
lineinfile:
|
||||
path: /root/bin/samba/conf/clean_samba_trash.conf
|
||||
regexp: "^trash_dirs=*"
|
||||
state: absent
|
||||
check_mode: yes
|
||||
changed_when: false
|
||||
register: set_permissions_samba_shares
|
||||
|
||||
- name: Creates a cron job for cleaning up samba trash dirs
|
||||
cron:
|
||||
name: '{{ samba_cronjob_permissions.name }}'
|
||||
minute: '{{ samba_cronjob_permissions.minute }}'
|
||||
hour: "{{ samba_cronjob_permissions.hour | default('*') }}"
|
||||
day: "{{ samba_cronjob_permissions.day | default('*') }}"
|
||||
month: "{{ samba_cronjob_permissions.month| default('*') }}"
|
||||
weekday: "{{ samba_cronjob_permissions.weekday| default('*') }}"
|
||||
user: "{{ samba_cronjob_permissions.user | default('root') }}"
|
||||
job: "{{ samba_cronjob_permissions.job }}"
|
||||
when:
|
||||
- set_permissions_samba_shares.found
|
||||
|
||||
|
||||
# ---
|
||||
# Samba clients
|
||||
# ---
|
||||
@ -81,5 +179,3 @@
|
||||
tags:
|
||||
- samba-client
|
||||
|
||||
|
||||
|
||||
|
57
roles/common/tasks/samba-remove-user.yml
Normal file
57
roles/common/tasks/samba-remove-user.yml
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
|
||||
# ---
|
||||
# - Remove unwanted users
|
||||
# ---
|
||||
|
||||
|
||||
- name: (samba-remove-user.yml) Check if samba user exists for removable system user
|
||||
shell: pdbedit -w -L | awk -F":" '{ print $1 }' | grep '{{ item.name }}'
|
||||
register: samba_remove_system_users_present
|
||||
changed_when: "samba_remove_system_users_present.rc == 0"
|
||||
failed_when: "samba_remove_system_users_present.rc > 1"
|
||||
with_items:
|
||||
- "{{ remove_system_users }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
tags:
|
||||
- samba-user
|
||||
|
||||
|
||||
- name: (samba-remove-user.yml) Remove (old) system users from samba
|
||||
shell: >
|
||||
smbpasswd -s -x {{ item.item.name }}
|
||||
with_items:
|
||||
- "{{ samba_remove_system_users_present.results }}"
|
||||
loop_control:
|
||||
label: '{{ item.item.name }}'
|
||||
when:
|
||||
- item.changed
|
||||
tags:
|
||||
- samba-user
|
||||
|
||||
|
||||
- name: (samba-remove-user.yml) Check if samba user exists for removable nis user
|
||||
shell: pdbedit -w -L | awk -F":" '{ print $1 }' | grep '{{ item.name }}'
|
||||
register: samba_remove_nis_users_present
|
||||
changed_when: "samba_remove_nis_users_present.rc == 0"
|
||||
failed_when: "samba_remove_nis_users_present.rc > 1"
|
||||
with_items:
|
||||
- "{{ remove_nis_users }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
tags:
|
||||
- samba-user
|
||||
|
||||
|
||||
- name: (samba-remove-user.yml) Remove (old) nis users from samba
|
||||
shell: >
|
||||
smbpasswd -s -x {{ item.item.name }}
|
||||
with_items:
|
||||
- "{{ samba_remove_nis_users_present.results }}"
|
||||
loop_control:
|
||||
label: '{{ item.item.name }}'
|
||||
when:
|
||||
- item.changed
|
||||
tags:
|
||||
- samba-user
|
@ -1,58 +1,5 @@
|
||||
---
|
||||
|
||||
# ---
|
||||
# - Remove unwanted users
|
||||
# ---
|
||||
|
||||
|
||||
- name: (samba_user.yml) Check if samba user exists for removable system user
|
||||
shell: pdbedit -w -L | awk -F":" '{ print $1 }' | grep '{{ item.name }}'
|
||||
register: samba_remove_system_users_present
|
||||
changed_when: "samba_remove_system_users_present.rc == 0"
|
||||
failed_when: "samba_remove_system_users_present.rc > 1"
|
||||
with_items:
|
||||
- "{{ remove_system_users }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
tags:
|
||||
- samba-user
|
||||
|
||||
|
||||
- name: (samba_user.yml) Remove (old) system users from samba
|
||||
shell: "smbpasswd -s -x {{ item.name }}"
|
||||
with_items:
|
||||
- "{{ remove_system_users }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: samba_remove_system_users_present is changed
|
||||
tags:
|
||||
- samba-user
|
||||
|
||||
|
||||
- name: (samba_user.yml) Check if samba user exists for removable nis user
|
||||
shell: pdbedit -w -L | awk -F":" '{ print $1 }' | grep '{{ item.name }}'
|
||||
register: samba_remove_inis_users_present
|
||||
changed_when: "samba_remove_inis_users_present.rc == 0"
|
||||
failed_when: "samba_remove_inis_users_present.rc > 1"
|
||||
with_items:
|
||||
- "{{ remove_nis_users }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
tags:
|
||||
- samba-user
|
||||
|
||||
|
||||
- name: (samba_user.yml) Remove (old) nis users from samba
|
||||
shell: "smbpasswd -s -x {{ item.name }}"
|
||||
with_items:
|
||||
- "{{ remove_nis_users }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: samba_remove_inis_users_present is changed
|
||||
tags:
|
||||
- samba-user
|
||||
|
||||
|
||||
# ---
|
||||
# - default user/groups
|
||||
# ---
|
||||
|
@ -13,6 +13,7 @@
|
||||
tags:
|
||||
- sshd-config
|
||||
|
||||
|
||||
- name: (sshd.yml) Create new sshd_config from template sshd_config.j2
|
||||
template:
|
||||
src: etc/ssh/sshd_config.j2
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
- name: (user.yml) Remove home directory from deleted users
|
||||
file:
|
||||
path: '{{ nis_base_home }}/{{ item.name }}'
|
||||
path: '{{ base_home }}/{{ item.name }}'
|
||||
state: absent
|
||||
with_items:
|
||||
- "{{ remove_system_users }}"
|
||||
@ -45,26 +45,20 @@
|
||||
|
||||
#- meta: end_host
|
||||
|
||||
- name: (user.yml) Check if system users exists
|
||||
shell: "getent passwd {{ item.name }}"
|
||||
register: system_users_exists
|
||||
changed_when: "system_users_exists.rc == 2"
|
||||
failed_when: "system_users_exists.rc > 2"
|
||||
loop: "{{ system_users }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
ignore_errors: true
|
||||
- name: (system-user.yml) Get database of nis (system) users
|
||||
getent:
|
||||
database: passwd
|
||||
tags:
|
||||
- system-user
|
||||
|
||||
- name: (user.yml) Add system users
|
||||
- name: (system-user.yml) Add (system) users if not yet exists..
|
||||
shell: "/root/bin/admin-stuff/add_new_user.sh {{ item.name }} '{{ item.password }}'"
|
||||
loop: "{{ system_users }}"
|
||||
loop_control:
|
||||
label: '{{ item.name }}'
|
||||
when: system_users_exists is changed
|
||||
when:
|
||||
- item.name not in getent_passwd
|
||||
notify: Renew nis databases
|
||||
tags:
|
||||
- system-user
|
||||
|
||||
|
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
|
||||
|
48
roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml
Normal file
48
roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml
Normal file
@ -0,0 +1,48 @@
|
||||
---
|
||||
# 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
|
||||
enabled: true
|
||||
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
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
{% set count.nfs_exports = count.nfs_exports + 10 %}
|
||||
{% for network in export.export_networks %}
|
||||
{% if export.fs_encrypted is defined and export.fs_encrypted is sameas true %}
|
||||
{% if export.use_fsid_option is defined and export.use_fsid_option is sameas true %}
|
||||
{% set export_str.nfs_exports = export_str.nfs_exports~" "~network~"("~export.export_opt~",fsid="~count.nfs_exports~")" %}
|
||||
#{{ export.src.split(":")[1] }} {{ network }}({{ export.export_opt }},fsid={{ count.nfs_exports }})
|
||||
{% else %}
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
# Change this to the workgroup/NT-domain name your Samba server will part of
|
||||
; workgroup = WORKGROUP
|
||||
workgroup = AKB
|
||||
workgroup = {{ samba_workgroup|default('WORKGROUP') }}
|
||||
|
||||
# Option 'netbios name' added to debian's default smb.conf
|
||||
#
|
||||
@ -41,22 +41,8 @@
|
||||
# Note that the maximum length for a NetBIOS name is 15 characters.
|
||||
#
|
||||
# Default: netbios name = # machine DNS name
|
||||
netbios name = FILE-AKB
|
||||
|
||||
# server string (G)
|
||||
#
|
||||
# This controls what string will show up in the printer comment box in print manager and next to the IPC
|
||||
# connection in net view. It can be any string that you wish to show to your users.
|
||||
#
|
||||
# It also sets what will appear in browse lists next to the machine name.
|
||||
#
|
||||
# A %v will be replaced with the Samba version number.
|
||||
#
|
||||
# A %h will be replaced with the hostname.
|
||||
#
|
||||
# Default: server string = Samba %v
|
||||
#
|
||||
server string = File Server ( Samba %v )
|
||||
; netbios name = FILE
|
||||
netbios name = {{ samba_netbios_name|default('FILE') }}
|
||||
|
||||
|
||||
#### Networking ####
|
||||
@ -115,8 +101,7 @@
|
||||
# Default: log level = 0
|
||||
#
|
||||
# Example: log level = 3 passdb:5 auth:10 winbind:2
|
||||
; log level = 0
|
||||
log level = 2
|
||||
log level = 0
|
||||
|
||||
# Do something sensible when Samba crashes: mail the admin a backtrace
|
||||
panic action = /usr/share/samba/panic-action %d
|
||||
@ -278,11 +263,11 @@
|
||||
|
||||
# By default, the home directories are exported read-only. Change the
|
||||
# next parameter to 'no' if you want to be able to write to them.
|
||||
read only = no
|
||||
read only = yes
|
||||
|
||||
# File creation mask is set to 0700 for security reasons. If you want to
|
||||
# create files with group=rw permissions, set next parameter to 0775.
|
||||
create mask = 0600
|
||||
create mask = 0700
|
||||
|
||||
# Directory creation mask is set to 0700 for security reasons. If you want to
|
||||
# create dirs. with group=rw permissions, set next parameter to 0775.
|
||||
@ -295,7 +280,6 @@
|
||||
# This might need tweaking when using external authentication schemes
|
||||
valid users = %S
|
||||
|
||||
|
||||
# Un-comment the following and create the netlogon directory for Domain Logons
|
||||
# (you need to configure Samba to act as a domain controller too.)
|
||||
;[netlogon]
|
||||
@ -317,17 +301,20 @@
|
||||
; create mask = 0600
|
||||
; directory mask = 0700
|
||||
|
||||
|
||||
{% for item in samba_shares | default([]) %}
|
||||
|
||||
[{{ item.name }}]
|
||||
comment = {{ item.name }}
|
||||
path = {{ item.path }}
|
||||
|
||||
create mask = 0660
|
||||
force create mode = 0660
|
||||
directory mask = 2770
|
||||
force directory mode = 2770
|
||||
browseable = yes
|
||||
read only = no
|
||||
writeable = Yes
|
||||
|
||||
create mask = {{ item.file_create_mask | default('0660') }}
|
||||
force create mode = {{ item.file_create_mask | default('0660') }}
|
||||
directory mask = {{ item.dir_create_mask | default('2770') }}
|
||||
force directory mode = {{ item.dir_create_mask | default('2770') }}
|
||||
|
||||
# can login into that share
|
||||
valid users = @{{ item.group_valid_users }}
|
||||
@ -335,6 +322,7 @@
|
||||
write list = @{{ item.group_write_list }}
|
||||
|
||||
force group = +{{ item.group_write_list }}
|
||||
{% if item.vfs_object_recycle is defined and item.vfs_object_recycle|bool %}
|
||||
|
||||
vfs objects = recycle
|
||||
recycle:keeptree = yes
|
||||
@ -347,22 +335,29 @@
|
||||
recycle:touch = yes
|
||||
recycle:touch_mtime = no
|
||||
recycle:versions = yes
|
||||
recycle:maxsize = 10485760 # around 10MB
|
||||
recycle:directory_mode = 2770
|
||||
|
||||
# - Dateien gößer als 10MB werden nicht
|
||||
#recycle:maxsize = 10485760 # around 10MB
|
||||
|
||||
# - Keine Begrenzung der Dateigröße.
|
||||
recycle:maxsize = 0
|
||||
|
||||
recycle:exclude = *.tmp,*.temp,*.o,*.obj,~$*,*.~??
|
||||
recycle:excludedir = /tmp,/temp,/cache,.Trash
|
||||
recycle:repository = .Trash/%U
|
||||
recycle:repository = {{ item.recycle_path | default('@Recycle.Bin') }}
|
||||
|
||||
# - This is a list of files and directories that are neither visible nor accessible.
|
||||
# - Each entry in the list must be separated by a '/', which allows spaces to be
|
||||
# - included in the entry. '*' and '?' can be used to specify multiple files or
|
||||
# - directories as in DOS wildcards.
|
||||
# -
|
||||
veto files = /.Trash/
|
||||
|
||||
[{{ item.name }}-Trash]
|
||||
comment = Papierkorb ({{ item.name }})
|
||||
path = {{ item.path }}/.Trash
|
||||
|
||||
browseable = yes
|
||||
read only = yes
|
||||
delete veto files = yes
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
;[printers]
|
||||
; comment = All Printers
|
||||
; browseable = no
|
||||
|
File diff suppressed because it is too large
Load Diff
10
roles/common/templates/lib/systemd/system/x11vnc.service.j2
Normal file
10
roles/common/templates/lib/systemd/system/x11vnc.service.j2
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Start x11vnc at startup.
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1,40 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# ------------------------------------
|
||||
# - Settings for script clean_trash.sh
|
||||
# ------------------------------------
|
||||
|
||||
# - days
|
||||
# -
|
||||
# - Files older then 'days' will be deleted.
|
||||
# -
|
||||
# - Defaults to: days=31
|
||||
# -
|
||||
#days=31
|
||||
|
||||
# - trash_dirs
|
||||
# -
|
||||
# - Directories where files older than given days will be deleted.
|
||||
# -
|
||||
# - Example:
|
||||
# - trash_dirs="/data/samba/transfer/.Trash /data/samba/no-backup-share/multimedia/.Trash"
|
||||
# -
|
||||
#trash_dirs=""
|
||||
|
||||
{%- set count = namespace(trash_dirs=0) %}
|
||||
|
||||
{%- for item in samba_shares | default([]) %}
|
||||
{% if (item.vfs_object_recycle is defined and item.vfs_object_recycle|bool) %}
|
||||
{% set count.trash_dirs = count.trash_dirs + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if count.trash_dirs > 0 %}
|
||||
trash_dirs="
|
||||
{% for item in samba_shares %}
|
||||
{% if (item.vfs_object_recycle is defined and item.vfs_object_recycle|bool) %}
|
||||
{{ item.path }}/{{ item.recycle_path }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
"
|
||||
{% endif %}
|
@ -0,0 +1,33 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# -----------------------------------------------------
|
||||
# - Settings for script set_permissions_samba_shares.sh
|
||||
# -----------------------------------------------------
|
||||
|
||||
# - dir_permissions
|
||||
# -
|
||||
# - Recursive set Permissions (group and file- and directory-mode)
|
||||
# -
|
||||
# - Multiple options are possible. Use semicolon separated list.
|
||||
# -
|
||||
# - Usage:
|
||||
# - dir_permissions="<directory>:<group>:<file-mod>:<dir-mod>;[<directory>:<group>:<file-mod>:<dir-mod>];[.."
|
||||
# -
|
||||
# - Example:
|
||||
# - dir_permissions="/data/samba/transfer:buero:664:2775;/data/samba/verwaltung:intern:660:2770"
|
||||
# -
|
||||
#dir_permissions=""
|
||||
|
||||
{%- set count = namespace(samba_shares=0) %}
|
||||
|
||||
{%- for item in samba_shares | default([]) %}
|
||||
{% set count.samba_shares = count.samba_shares + 1 %}
|
||||
{% endfor %}
|
||||
|
||||
{% if count.samba_shares > 0 %}
|
||||
dir_permissions="
|
||||
{% for item in samba_shares | default([]) %}
|
||||
{{ item.path }}:{{ item.group_write_list }}:{{ item.file_create_mask | default('0660') }}:{{ item.dir_create_mask | default('2770') }};
|
||||
{% endfor %}
|
||||
"
|
||||
{% endif %}
|
394
tatus
394
tatus
@ -1,394 +0,0 @@
|
||||
[1mdiff --git a/group_vars/all/main.yml b/group_vars/all/main.yml[m
|
||||
[1mindex 7b325e6..603929a 100644[m
|
||||
[1m--- a/group_vars/all/main.yml[m
|
||||
[1m+++ b/group_vars/all/main.yml[m
|
||||
[36m@@ -554,10 +554,18 @@[m [mapt_initial_install_bionic:[m
|
||||
- ifupdown[m
|
||||
- socat[m
|
||||
[m
|
||||
[31m-microcode_package: [m
|
||||
[32m+[m[32mmicrocode_intel_package:[m[41m [m
|
||||
- intel-microcode[m
|
||||
[32m+[m
|
||||
[32m+[m[32mmicrocode_amd_package:[m[41m [m
|
||||
- amd64-microcode[m
|
||||
[m
|
||||
[32m+[m[32mfirmware_packages:[m
|
||||
[32m+[m[32m - firmware-linux[m
|
||||
[32m+[m
|
||||
[32m+[m[32mfirmware_non_free_packages:[m
|
||||
[32m+[m[32m - firmware-linux-nonfree[m
|
||||
[32m+[m
|
||||
apt_install_state: latest[m
|
||||
[m
|
||||
apt_remove:[m
|
||||
[36m@@ -727,6 +735,167 @@[m [mapt_install_client_samba:[m
|
||||
samba_server: file-akb.akb.netz[m
|
||||
[m
|
||||
[m
|
||||
[32m+[m[32m# ==========[m
|
||||
[32m+[m[32m# vars used by roles/common/tasks/pure-ftpd-install.yml[m
|
||||
[32m+[m[32m# ==========[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_global_config_file: /etc/default/pure-ftpd-common[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_config_dir: /etc/pure-ftpd[m
|
||||
[32m+[m[32mpureftpd_config_conf_dir: "{{ pureftpd_config_dir }}/conf"[m
|
||||
[32m+[m[32mpureftpd_config_auth_dir: "{{ pureftpd_config_dir }}/auth"[m
|
||||
[32m+[m[32mpureftpd_config_db_dir: "{{ pureftpd_config_dir }}/db"[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_config_fortune_file: "{{ pureftpd_config_dir }}/pureftpd-fortune.txt"[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_tls_certificate_pem: /etc/ssl/private/pure-ftpd.pem[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_packages:[m
|
||||
[32m+[m[32m - pure-ftpd-common[m
|
||||
[32m+[m[32m - pure-ftpd[m
|
||||
[32m+[m
|
||||
[32m+[m[32m# pure-ftpd-common.j2[m
|
||||
[32m+[m[32mpureftpd_global_config_mode: standalone[m
|
||||
[32m+[m[32mpureftpd_global_config_virtualchroot: false[m
|
||||
[32m+[m[32mpureftpd_global_config_uploadscript: ''[m[41m [m
|
||||
[32m+[m[32mpureftpd_global_config_uploaduid: ''[m
|
||||
[32m+[m[32mpureftpd_global_config_uploadgid: ''[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_config:[m
|
||||
[32m+[m[32m AltLog: 'clf:/var/log/pure-ftpd/transfer.log'[m
|
||||
[32m+[m[32m AnonymousCantUpload: 'yes'[m
|
||||
[32m+[m[32m Bind: ',21'[m
|
||||
[32m+[m[32m CustomerProof: 'yes'[m
|
||||
[32m+[m[32m DisplayDotFiles: 'yes'[m
|
||||
[32m+[m[32m DontResolve: 'yes'[m
|
||||
[32m+[m[32m FSCharset: 'UTF-8'[m
|
||||
[32m+[m[32m ForcePassiveIP: ''[m
|
||||
[32m+[m[32m MaxDiskUsage: '80'[m
|
||||
[32m+[m[32m MinUID: '1000'[m
|
||||
[32m+[m[32m NoAnonymous: 'yes'[m
|
||||
[32m+[m[32m PAMAuthentication: 'no'[m
|
||||
[32m+[m[32m PassivePortRange: '50000 50400'[m
|
||||
[32m+[m[32m ProhibitDotFilesRead: 'no'[m
|
||||
[32m+[m[32m ProhibitDotFilesWrite: 'yes'[m
|
||||
[32m+[m[32m PureDB: '/etc/pure-ftpd/pureftpd.pdb'[m
|
||||
[32m+[m[32m SyslogFacility: 'ftp'[m
|
||||
[32m+[m[32m TLS: '1'[m
|
||||
[32m+[m[32m TLSCipherSuite: 'HIGH'[m
|
||||
[32m+[m[32m UnixAuthentication: 'no'[m
|
||||
[32m+[m[32m #[m[41m [m
|
||||
[32m+[m[32m # Available properties[m
|
||||
[32m+[m[32m #[m
|
||||
[32m+[m[32m # Available properties[m
|
||||
[32m+[m[32m # AllowAnonymousFXP: 'no'[m
|
||||
[32m+[m[32m # AllowUserFXP: 'no'[m
|
||||
[32m+[m[32m # AltLog: 'clf:/var/log/pure-ftpd/transfer.log'[m
|
||||
[32m+[m[32m # AnonymousBandwidth: '8'[m
|
||||
[32m+[m[32m # AnonymousCanCreateDirs: 'no'[m
|
||||
[32m+[m[32m # AnonymousCantUpload: 'yes'[m
|
||||
[32m+[m[32m # AnonymousOnly: 'no'[m
|
||||
[32m+[m[32m # AnonymousRatio: '1 10'[m
|
||||
[32m+[m[32m # AntiWarez: 'yes'[m
|
||||
[32m+[m[32m # AutoRename: 'no'[m
|
||||
[32m+[m[32m # Bind: '127.0.0.1,21'[m
|
||||
[32m+[m[32m # BrokenClientsCompatibility: 'no'[m
|
||||
[32m+[m[32m # CallUploadScript: 'yes'[m
|
||||
[32m+[m[32m # ChrootEveryone: 'yes'[m
|
||||
[32m+[m[32m # ClientCharset: 'UTF-8'[m
|
||||
[32m+[m[32m # CreateHomeDir: 'yes'[m
|
||||
[32m+[m[32m # CustomerProof: 'yes'[m
|
||||
[32m+[m[32m # Daemonize: 'yes'[m
|
||||
[32m+[m[32m # DisplayDotFiles: 'yes'[m
|
||||
[32m+[m[32m # DontResolve: 'yes'[m
|
||||
[32m+[m[32m # ExtAuth: /var/run/ftpd.sock[m
|
||||
[32m+[m[32m # ForcePassiveIP: '192.168.0.1'[m
|
||||
[32m+[m[32m # FortunesFile: '/etc/pure-ftpd/cookie'[m
|
||||
[32m+[m[32m # FSCharset: 'utf8'[m
|
||||
[32m+[m[32m # IPV4Only: 'yes'[m
|
||||
[32m+[m[32m # IPV6Only: 'yes'[m
|
||||
[32m+[m[32m # KeepAllFiles: 'yes'[m
|
||||
[32m+[m[32m # LDAPConfigFile: /etc/pureftpd-ldap.conf[m
|
||||
[32m+[m[32m # LimitRecursion: '10000 8'[m
|
||||
[32m+[m[32m # LogPID: 'yes'[m
|
||||
[32m+[m[32m # MaxClientsNumber: '10'[m
|
||||
[32m+[m[32m # MaxClientsPerIP: "{{ ansible_processor_cores }}"[m
|
||||
[32m+[m[32m # MaxDiskUsage: '80'[m
|
||||
[32m+[m[32m # MaxIdleTime: '15'[m
|
||||
[32m+[m[32m # MaxLoad: '4'[m
|
||||
[32m+[m[32m # MinUID: '1000'[m
|
||||
[32m+[m[32m # MySQLConfigFile: /etc/pure-ftpd/mysql.conf[m
|
||||
[32m+[m[32m # NoAnonymous: 'yes'[m
|
||||
[32m+[m[32m # NoChmod: 'yes'[m
|
||||
[32m+[m[32m # NoRename: 'yes'[m
|
||||
[32m+[m[32m # NoTruncate: 'yes'[m
|
||||
[32m+[m[32m # PAMAuthentication: 'no'[m
|
||||
[32m+[m[32m # PassivePortRange: '30000 50000'[m
|
||||
[32m+[m[32m # PerUserLimits: '3 20'[m
|
||||
[32m+[m[32m # PGSQLConfigFile: /etc/pureftpd-pgsql.conf[m
|
||||
[32m+[m[32m # PIDFile: '/var/run/pure-ftpd.pid'[m
|
||||
[32m+[m[32m # ProhibitDotFilesRead: 'yes'[m
|
||||
[32m+[m[32m # ProhibitDotFilesWrite: 'yes'[m
|
||||
[32m+[m[32m # PureDB: /etc/pure-ftpd/pureftpd.pdb[m
|
||||
[32m+[m[32m # Quota: '1000 10'[m
|
||||
[32m+[m[32m # SyslogFacility: 'ftp'[m
|
||||
[32m+[m[32m # TLS: '0'[m
|
||||
[32m+[m[32m # TLSCipherSuite: 'ALL:!aNULL:!SSLv3'[m
|
||||
[32m+[m[32m # TrustedIP: '10.1.1.1'[m
|
||||
[32m+[m[32m # Umask: '113 002'[m
|
||||
[32m+[m[32m # UnixAuthentication: 'no'[m
|
||||
[32m+[m[32m # UserBandwidth: '8'[m
|
||||
[32m+[m[32m # UserRatio: '1 10'[m
|
||||
[32m+[m[32m # VerboseLog: 'no'[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_auth_puredb: 50[m
|
||||
[32m+[m[32mpureftpd_auth_mysql: 0[m
|
||||
[32m+[m[32mpureftpd_auth_postgresql: 0[m
|
||||
[32m+[m[32mpureftpd_auth_ldap: 0[m
|
||||
[32m+[m[32mpureftpd_auth_unix: 65[m
|
||||
[32m+[m[32mpureftpd_auth_pam: 70[m
|
||||
[32m+[m
|
||||
[32m+[m[32m# Default FTP user/group[m
|
||||
[32m+[m[32mpureftpd_virtual_users_group: nobody[m
|
||||
[32m+[m[32mpureftpd_virtual_users_user: nogroup[m
|
||||
[32m+[m[32m# pureftpd_virtual_users_gid: '65534'[m
|
||||
[32m+[m[32m# pureftpd_virtual_users_uid: '65534'[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_virtual_users:[m
|
||||
[32m+[m[32m - name: maica_scan[m
|
||||
[32m+[m[32m password: maica_scan[m
|
||||
[32m+[m[32m homedir: /data/samba/Scans/Maica_scans[m
|
||||
[32m+[m[32m uid: maica[m
|
||||
[32m+[m[32m gid: users[m
|
||||
[32m+[m[32m - name: buero_scan[m
|
||||
[32m+[m[32m password: buero_scan[m
|
||||
[32m+[m[32m homedir: /data/samba/Scans/Buero_Scans[m
|
||||
[32m+[m[32m uid: buero[m
|
||||
[32m+[m[32m gid: users[m
|
||||
[32m+[m[32m - name: jibran_scan[m
|
||||
[32m+[m[32m password: jibran_scan[m
|
||||
[32m+[m[32m homedir: /data/samba/Scans/Jibran_scan_Scans[m
|
||||
[32m+[m[32m uid: jibran[m
|
||||
[32m+[m[32m gid: users[m
|
||||
[32m+[m[32m # Available properties[m
|
||||
[32m+[m[32m # - name: vuser1[m
|
||||
[32m+[m[32m # password: p4ssW0rd[m
|
||||
[32m+[m[32m # homedir: /var/ftp/vuser1[m
|
||||
[32m+[m[32m # uid: 2000[m
|
||||
[32m+[m[32m # gid: 2000[m
|
||||
[32m+[m[32m # quota_files: 2000[m
|
||||
[32m+[m[32m # quota_size: 500[m
|
||||
[32m+[m[32m # bandwidth_ul: 5[m
|
||||
[32m+[m[32m # bandwidth_dl: 5[m
|
||||
[32m+[m[32m # ratio_ul: 10[m
|
||||
[32m+[m[32m # ratio_dl: 1[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_virtual_deleted_users: [][m
|
||||
[32m+[m[32m # Available properties[m
|
||||
[32m+[m[32m # - name: vuser2[m
|
||||
[32m+[m
|
||||
[32m+[m[32mpureftpd_virtual_users_import: false[m
|
||||
[32m+[m
|
||||
[32m+[m
|
||||
[32m+[m
|
||||
# ==========[m
|
||||
# vars used by roles/common/tasks/user.yml[m
|
||||
# ==========[m
|
||||
[1mdiff --git a/hosts b/hosts[m
|
||||
[1mindex 98add24..e3079cd 100644[m
|
||||
[1m--- a/hosts[m
|
||||
[1m+++ b/hosts[m
|
||||
[36m@@ -53,4 +53,8 @@[m [mfile-akb.akb.netz ansible_user=root[m
|
||||
file-akb.akb.netz ansible_user=root[m
|
||||
192.168.82.20 ansible_user=root[m
|
||||
[m
|
||||
[32m+[m[32m[ftp_server][m
|
||||
[32m+[m[32mfile-akb.akb.netz ansible_user=root[m
|
||||
[32m+[m[32m192.168.82.20 ansible_user=root[m
|
||||
[32m+[m
|
||||
[gateway_server][m
|
||||
[1mdiff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml[m
|
||||
[1mindex f9391f6..be73450 100644[m
|
||||
[1m--- a/roles/common/handlers/main.yml[m
|
||||
[1m+++ b/roles/common/handlers/main.yml[m
|
||||
[36m@@ -59,3 +59,12 @@[m
|
||||
name: cups-browsed[m
|
||||
daemon_reload: yes[m
|
||||
state: restarted[m
|
||||
[32m+[m
|
||||
[32m+[m[32m- name: reload Pure-FTPd users[m
|
||||
[32m+[m[32m command: pure-pw mkdb[m
|
||||
[32m+[m
|
||||
[32m+[m[32m- name: restart Pure-FTPd[m
|
||||
[32m+[m[32m service:[m
|
||||
[32m+[m[32m name: pure-ftpd[m
|
||||
[32m+[m[32m state: restarted[m
|
||||
[41m+[m
|
||||
[1mdiff --git a/roles/common/tasks/apt.yml b/roles/common/tasks/apt.yml[m
|
||||
[1mindex 466edd1..77fd1c4 100644[m
|
||||
[1m--- a/roles/common/tasks/apt.yml[m
|
||||
[1m+++ b/roles/common/tasks/apt.yml[m
|
||||
[36m@@ -96,12 +96,17 @@[m
|
||||
tags:[m
|
||||
- apt-initial-install[m
|
||||
[m
|
||||
[31m-- name: (apt.yml) Ensure we have CPU microcode from backports (debian stretch)[m
|
||||
[32m+[m[32m# ---[m
|
||||
[32m+[m[32m# Microcode[m
|
||||
[32m+[m[32m# ---[m
|
||||
[32m+[m
|
||||
[32m+[m[32m- name: (apt.yml) Ensure we have CPU microcode from backports for Intel CPU (debian stretch)[m
|
||||
apt:[m
|
||||
[31m- name: "{{ microcode_package }}"[m
|
||||
[32m+[m[32m name: "{{ microcode_intel_package }}"[m
|
||||
state: present[m
|
||||
default_release: "{{ ansible_distribution_release }}-backports"[m
|
||||
when:[m
|
||||
[32m+[m[32m - apt_backports_enable[m
|
||||
- ansible_facts['distribution'] == "Debian"[m
|
||||
- ansible_facts['distribution_major_version'] == "9"[m
|
||||
- ansible_facts['processor']|string is search("Intel")[m
|
||||
[36m@@ -109,9 +114,24 @@[m
|
||||
- apt-initial-install[m
|
||||
- apt-microcode[m
|
||||
[m
|
||||
[31m-- name: (apt.yml) Install CPU microcode (debian buster)[m
|
||||
[32m+[m[32m- name: (apt.yml) Ensure we have CPU microcode from backports for AMD CPU (debian stretch)[m
|
||||
[32m+[m[32m apt:[m
|
||||
[32m+[m[32m name: "{{ microcode_amd_package }}"[m
|
||||
[32m+[m[32m state: present[m
|
||||
[32m+[m[32m default_release: "{{ ansible_distribution_release }}-backports"[m
|
||||
[32m+[m[32m when:[m
|
||||
[32m+[m[32m - apt_backports_enable[m
|
||||
[32m+[m[32m - apt_debian_contrib_nonfree_enable[m
|
||||
[32m+[m[32m - ansible_facts['distribution'] == "Debian"[m
|
||||
[32m+[m[32m - ansible_facts['distribution_major_version'] == "9"[m
|
||||
[32m+[m[32m - ansible_facts['processor']|string is search("AMD")[m
|
||||
[32m+[m[32m tags:[m
|
||||
[32m+[m[32m - apt-initial-install[m
|
||||
[32m+[m[32m - apt-microcode[m
|
||||
[32m+[m
|
||||
[32m+[m[32m- name: (apt.yml) Install CPU microcode for Intel CPU (debian buster)[m
|
||||
apt:[m
|
||||
[31m- name: "{{ microcode_package }}"[m
|
||||
[32m+[m[32m name: "{{ microcode_intel_package }}"[m
|
||||
state: present[m
|
||||
default_release: "{{ ansible_distribution_release }}"[m
|
||||
when:[m
|
||||
[36m@@ -122,9 +142,23 @@[m
|
||||
- apt-initial-install[m
|
||||
- apt-microcode[m
|
||||
[m
|
||||
[31m-- name: (apt.yml) Install CPU microcode (ubuntu bionic)[m
|
||||
[32m+[m[32m- name: (apt.yml) Install CPU microcode for AMD CPU (debian buster)[m
|
||||
apt:[m
|
||||
[31m- name: "{{ microcode_package }}"[m
|
||||
[32m+[m[32m name: "{{ microcode_amd_package }}"[m
|
||||
[32m+[m[32m state: present[m
|
||||
[32m+[m[32m default_release: "{{ ansible_distribution_release }}"[m
|
||||
[32m+[m[32m when:[m
|
||||
[32m+[m[32m - apt_debian_contrib_nonfree_enable[m
|
||||
[32m+[m[32m - ansible_facts['distribution'] == "Debian"[m
|
||||
[32m+[m[32m - ansible_facts['distribution_major_version'] == "10"[m
|
||||
[32m+[m[32m - ansible_facts['processor']|string is search("AMD")[m
|
||||
[32m+[m[32m tags:[m
|
||||
[32m+[m[32m - apt-initial-install[m
|
||||
[32m+[m[32m - apt-microcode[m
|
||||
[32m+[m
|
||||
[32m+[m[32m- name: (apt.yml) Install CPU microcode for Intel CPU (ubuntu bionic)[m
|
||||
[32m+[m[32m apt:[m
|
||||
[32m+[m[32m name: "{{ microcode_intel_package }}"[m
|
||||
state: present[m
|
||||
default_release: "{{ ansible_distribution_release }}"[m
|
||||
when:[m
|
||||
[36m@@ -135,9 +169,23 @@[m
|
||||
- apt-initial-install[m
|
||||
- apt-microcode[m
|
||||
[m
|
||||
[31m-- name: (apt.yml) Install CPU microcode (ubuntu xenial)[m
|
||||
[32m+[m[32m- name: (apt.yml) Install CPU microcode for AMD CPU (ubuntu bionic)[m
|
||||
apt:[m
|
||||
[31m- name: "{{ microcode_package }}"[m
|
||||
[32m+[m[32m name: "{{ microcode_amd_package }}"[m
|
||||
[32m+[m[32m state: present[m
|
||||
[32m+[m[32m default_release: "{{ ansible_distribution_release }}"[m
|
||||
[32m+[m[32m when:[m
|
||||
[32m+[m[32m - apt_debian_contrib_nonfree_enable[m
|
||||
[32m+[m[32m - ansible_facts['distribution'] == "Ubuntu"[m
|
||||
[32m+[m[32m - ansible_facts['distribution_release'] == "bionic"[m
|
||||
[32m+[m[32m - ansible_facts['processor']|string is search("AMD")[m
|
||||
[32m+[m[32m tags:[m
|
||||
[32m+[m[32m - apt-initial-install[m
|
||||
[32m+[m[32m - apt-microcode[m
|
||||
[32m+[m
|
||||
[32m+[m[32m- name: (apt.yml) Install CPU microcode for Intel CPU (ubuntu xenial)[m
|
||||
[32m+[m[32m apt:[m
|
||||
[32m+[m[32m name: "{{ microcode_intel_package }}"[m
|
||||
state: present[m
|
||||
default_release: "{{ ansible_distribution_release }}"[m
|
||||
when:[m
|
||||
[36m@@ -148,6 +196,49 @@[m
|
||||
- apt-initial-install[m
|
||||
- apt-microcode[m
|
||||
[m
|
||||
[32m+[m[32m- name: (apt.yml) Install CPU microcode for Intel AMD (ubuntu xenial)[m
|
||||
[32m+[m[32m apt:[m
|
||||
[32m+[m[32m name: "{{ microcode_amd_package }}"[m
|
||||
[32m+[m[32m state: present[m
|
||||
[32m+[m[32m default_release: "{{ ansible_distribution_release }}"[m
|
||||
[32m+[m[32m when:[m
|
||||
[32m+[m[32m - apt_debian_contrib_nonfree_enable[m
|
||||
[32m+[m[32m - ansible_facts['distribution'] == "Ubuntu"[m
|
||||
[32m+[m[32m - ansible_facts['distribution_release'] == "xenial"[m
|
||||
[32m+[m[32m - ansible_facts['processor']|string is search("AMD")[m
|
||||
[32m+[m[32m tags:[m
|
||||
[32m+[m[32m - apt-initial-install[m
|
||||
[32m+[m[32m - apt-microcode[m
|
||||
[32m+[m
|
||||
[32m+[m[32m# ---[m
|
||||
[32m+[m[32m# Firmware[m
|
||||
[32m+[m[32m# ---[m
|
||||
[32m+[m
|
||||
[32m+[m[32m- name: (apt.yml) Install Firmware packages[m
|
||||
[32m+[m[32m apt:[m
|
||||
[32m+[m[32m name: "{{ firmware_non_free_packages }}"[m
|
||||
[32m+[m[32m state: present[m
|
||||
[32m+[m[32m default_release: "{{ ansible_distribution_release }}"[m
|
||||
[32m+[m[32m tags:[m
|
||||
[32m+[m[32m - apt-initial-install[m
|
||||
[32m+[m[32m - apt-firmware[m
|
||||
[32m+[m
|
||||
[32m+[m[32m- name: (apt.yml) Install non-free Firmware packages[m
|
||||
[32m+[m[32m apt:[m
|
||||
[32m+[m[32m name: "{{ firmware_non_free_packages }}"[m
|
||||
[32m+[m[32m state: present[m
|
||||
[32m+[m[32m default_release: "{{ ansible_distribution_release }}"[m
|
||||
[32m+[m[32m when:[m
|
||||
[32m+[m[32m - apt_debian_contrib_nonfree_enable[m
|
||||
[32m+[m[32m tags:[m
|
||||
[32m+[m[32m - apt-initial-install[m
|
||||
[32m+[m[32m - apt-firmware[m
|
||||
[32m+[m
|
||||
[32m+[m
|
||||
[32m+[m[32m# ---[m
|
||||
[32m+[m[32m# unwanted packages[m
|
||||
[32m+[m[32m# ---[m
|
||||
[32m+[m
|
||||
- name: (apt.yml) Remove unwanted packages[m
|
||||
apt:[m
|
||||
name: "{{ apt_remove }}"[m
|
||||
[1mdiff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml[m
|
||||
[1mindex cba68be..b9802b6 100644[m
|
||||
[1m--- a/roles/common/tasks/main.yml[m
|
||||
[1m+++ b/roles/common/tasks/main.yml[m
|
||||
[36m@@ -55,6 +55,14 @@[m
|
||||
tags:[m
|
||||
- cups[m
|
||||
[m
|
||||
[32m+[m[32m# tags supported inside cups-install.yml:[m
|
||||
[32m+[m[32m#[m
|
||||
[32m+[m[32m- import_tasks: pure-ftpd-install.yml[m
|
||||
[32m+[m[32m when:[m[41m [m
|
||||
[32m+[m[32m - groups['ftp_server']|string is search(inventory_hostname)[m
|
||||
[32m+[m[32m tags:[m
|
||||
[32m+[m[32m - pure-ftpd[m
|
||||
[32m+[m
|
||||
# tags supported inside nfs.yml:[m
|
||||
#[m
|
||||
# nfs-server[m
|
Loading…
Reference in New Issue
Block a user