diff --git a/README b/README
deleted file mode 100644
index 9760129..0000000
--- a/README
+++ /dev/null
@@ -1,123 +0,0 @@
-
- Run Debian in your Local Area Network
- =======================================
-
-The goal of the "Debian Local Area Network"-project is to make setting
-up Debian in a local area network as easy as possible. This repository
-offers ansible playbooks and instructions for the following machines:
-
- • installbox: orchestration of automatic installs in the LAN
- - set up as gateway to some external network (WAN)
- - provides TFTP installations on the LAN interface
- - automatic installs: preseeding and ansible playbooks
- - package cache
-
- • kerberox: serving a minimalistic kerberized LAN
- - automatic TFTP installation of clients
- - centralized home directories on kerberized NFS
- - simple script to manage users and machines
-
- • kerberox-client: the client for the kerberized LAN
-
- • sambox and -client: comparable to the kerberox setup, but
- home directories are shared via sshfs or the smb protocol.
-
- • cloudbox: nextcloud server in the basement
- - setup of a home cloud server
- - dynamic DNS name
- - nextcloud
- - backup with borg
- - …
-
- • kiosk: school's computer, hackerspace, …
- - auto login user
- - reasonable defaults
- - temporary home directory on tmpfs, reset at boot
-
- • edubox: deploy a set of containers for training/teaching
-
-Contributions like patches, suggestions, pull requests and/or further
-profiles are highly appreciated!
-
-----------------------------
-
- Instructions
-==============
-
-Installbox
-~~~~~~~~~~
- • standard Debian installation:
- - user 'ansible' in sudo group
- - WAN interface configured and connected
- - LAN interface not configured/managed
-
- • optional: customize installbox.yml
-
- • run ansible:
- ssh-copy-id ansible@1.2.3.4
- ansible-playbook installbox.yml -v --become --ask-become-pass -u ansible -i 1.2.3.4,
-
- • the installbox can be used to install all other profiles
-
-Kerberox, Sambox
-~~~~~~~~~~~~~~~~
- • standard Debian installation:
- - user 'ansible' in sudo group
- - WAN interface configured and connected
- - LAN interface not configured/managed
-
- • optional: customize kerberox.yml
-
- • run ansible:
- ssh-copy-id ansible@1.2.3.4
- ansible-playbook kerberox.yml -v --become --ask-become-pass -u ansible -i 1.2.3.4,
-
-Kerberox and installbox provide a local ansible configuration space
-which can be used to install clients and/or to check/modify the local
-installation. To do the latter, cd into 'debian-lan' and run:
-
- 'ansible-playbook --ask-become-pass -v -i localhost, -c local kerberox.yml'
-
-The kerberox-clients are automatically installed using the included TFTP netboot
-installer within the LAN.
-
-Cloudbox
-~~~~~~~~
- • Debian installation:
- - user 'ansible' in sudo group
-
- • check/customize cloudbox.yml
-
- • download latest nextcloud-*.*.*.tar.bz2 archive and place it as nextcloud.tar.bz2
- in your debian-lan-ansible directory
-
- • run ansible:
- ssh-copy-id ansible@1.2.3.4
- ansible-playbook cloudbox.yml -v --become --ask-become-pass -u ansible -i 1.2.3.4,
-
- • use 'nc-admin' with password in '/root/nc-admin.pwd' to log into nextcloud.
-
-Kiosk
-~~~~~
- • Debian installation:
- - user 'ansible' in sudo group
-
- • customize kiosk.yml:
- - WiFi parameters
- - package selection: extra_pkgs and extra_pkgs_bpo for backports
- - desktop environment
-
- • run ansible:
- ssh-copy-id ansible@1.2.3.4
- ansible-playbook kiosk.yml -v --become --ask-become-pass -u ansible -i 1.2.3.4,
-
-Edubox
-~~~~~~
- • Debian installation:
- - user 'ansible' in sudo group
-
- • customize edubox.yml
-
- • run ansible:
- ssh-copy-id ansible@1.2.3.4
- ansible-playbook edubox.yml -v --become --ask-become-pass -u ansible -i 1.2.3.4,
diff --git a/README.kerberox b/README.kerberox
deleted file mode 100644
index fd84d98..0000000
--- a/README.kerberox
+++ /dev/null
@@ -1,14 +0,0 @@
-## After installation of the clients, prepare and copy all machine
-## credentials to the machines in the following way:
-
-## Log into the Kerberos KDC (kerberox).
-
-## Find the kadmin password to be used soon:
- sudo cat /root/kadmin.pwd
-
-## Then:
- cd /home/ansible/debian-lan/
- ansible-playbook --ask-become-pass kerberox-client.yml \
- --ssh-common-args='-o StrictHostKeyChecking=no'
-
-## Enter the 'BECOME' password and the kadmin password obtained above.
diff --git a/cloudbox.yml b/cloudbox.yml
deleted file mode 100644
index b487d1a..0000000
--- a/cloudbox.yml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-# This playbook deploys the cloudbox on a minimal installation.
-
-- name: apply configuration to the cloudbox
- # hosts: cloudboxes ## 'all' is needed to make ansible-pull work
- hosts: all
- remote_user: ansible
- become: true
- vars:
- if_lan: "enp1s0"
- ipaddr: "192.168.2.50/24"
- gateway: "192.168.2.1"
- dns: "192.168.2.1"
- ddns_domain: "something.ddnss.de"
- ddns_updkey: "138638.some.key.here.635620"
- ## 'nc_download' and 'nc_checksum' are only
- ## used for ansible-pull during installation:
- nc_download: "https://download.nextcloud.com/server/releases/latest.tar.bz2"
- nc_checksum: "sha256:d32a8f6c4722a45cb67de7018163cfafcfa22a871fbac0f623c3875fa4304e5a"
- nc_apps:
- - calendar
- - notes
- backup_opts: "--exclude-caches -e '*/updater-*/' -e '*/preview/*' -e '*/files_trashbin/*'"
- backup_dirs:
- - "/etc"
- - "{{ nc_dir }}"
- - "{{ data_dir }}"
- ansible_python_interpreter: "/usr/bin/python3"
-
- roles:
- - up2date_debian
-# - ddnsupdate
-# - lowpower
- - nextcloud
- - nextcloudupgrade
- - kerberize
-# - backup
-
-## Hosts in the the 'only_nextcloud'-group are only upgraded:
-
-- name: upgrade nextcloud only
- hosts: only_nextcloud
- remote_user: ansible
- become: true
- vars:
- nc_dir: "/var/www/nextcloud"
- nc_apps:
- - calendar
- - notes
- ansible_python_interpreter: "/usr/bin/python3"
-
- roles:
- - up2date_debian
- - nextcloudupgrade
diff --git a/edubox.yml b/edubox.yml
deleted file mode 100644
index 76b188c..0000000
--- a/edubox.yml
+++ /dev/null
@@ -1,68 +0,0 @@
----
-## This playbook deploys a series of minimal systemd-nspawn containers
-## for educational use on a host, for example to learn ansible!
-## All containers use an apt cache on the host system and forward port
-## 22 (ssh), 80 (http) and 443 (https) to ports >= 10000, 10100 and 10200
-## respectively. A user 'ansi' in the 'sudo' group is prepared,
-## either with empty password or an initial password to be set below.
-##
-## Modifications of the initial containers are kept in an overlay
-## directory next to the container images in '/var/lib/machines/'.
-## This allows to visit and compare the work of students on the host.
-## To manage the containers after installation, run the playbook with
-## one of the the following tags:
-##
-## --tags=start start all containers
-## --tags=stop stop all containers
-## --tags=restart stop, then start all containers
-## --tags=reset reset all containers to the initial image
-## --tags=purge purge all containers
-## --tags=setup purge all containers and setup again
-##
-
-- name: apply configuration to the edubox
- hosts: all # eduboxes
- remote_user: ansible
- become: true
- vars:
- contname: cont
- ## User name for the user in the container:
- contuser: ansi
- ## Password for the user 'ansible' in the container,
- ## leave empty to log in without password:
- contpwd: ""
- ## Adjust the number of containers here:
- containers: "{{ range(0, 49 + 1) | list }}"
- ## Additional packages to be installed in the container:
- cont_packages_extra:
- - bind9-dnsutils
- - file
- - locales
- - xz-utils
- - lsof
- - wget
- - bind9-host
- - libc-l10n
- - traceroute
- - bzip2
- - netcat-traditional
- - telnet
-
- pre_tasks:
- - name: install apt-cacher-ng
- apt:
- name:
- - apt-cacher-ng
- - auto-apt-proxy
- state: latest # noqa package-latest
-
- - name: enable and start systemd-networkd on the host
- systemd:
- name: systemd-networkd
- state: started
- enabled: true
-
- roles:
- - up2date_debian
- - educontainer
- - networkdresolved
diff --git a/fvs-desktop.yml b/fvs-desktop.yml
deleted file mode 100644
index a97a744..0000000
--- a/fvs-desktop.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-## This playbook deploys a FvS desktop machine.
----
-- name: apply configuration to the machines
- hosts: all
- remote_user: ansible
- become: yes
- vars:
- extra_pkgs:
- - webext-privacy-badger
- - webext-ublock-origin
- - vim
- - emacs
- - elpa-magit
- - elpa-color-theme-modern
- - vlc
- - gimp
- - inkscape
- - bluefish
- - git
- - gitk
- - gitg
- - mc
- - tmux
- - wireshark
- - nmap
- - netcat-openbsd
- - net-tools
- - ghex
- - thonny
- - spyder
- - mu-editor
- - dia
- - vym
- - tree
- - console-setup
- - virt-manager
- - libreoffice-l10n-de
- extra_pkgs_bpo: [ libreoffice ] # [ linux-image-amd64 ] # [ libreoffice ]
- ansible_python_interpreter: "/usr/bin/python3"
-
- roles:
- - up2date_debian
- - fvs-sssd
- - fvs-mount
- - fvs-client
- ## Choose either gnome or KDE:
- - gnome
- #- kde
-
- tasks:
- - name: Add local user 'virti' in the 'libvirt' group
- ansible.builtin.user:
- name: virti
- password: $y$j9T$DuSvAO63v5LvoJmJ1rB0B0$D4tovIz79AdLHs5I6tYa7rxr3SWknQeUFvGaaKvUpo3
- comment: Libvirt VM User,,,
- shell: /bin/bash
- groups: libvirt
- append: yes
diff --git a/fvs-home-server.yml b/fvs-home-server.yml
deleted file mode 100644
index 1369dd3..0000000
--- a/fvs-home-server.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-## This playbook deploys a FvS home server machine.
----
-- name: apply configuration to the home server
- hosts: all
- remote_user: ansible
- become: yes
- vars:
- extra_pkgs:
- - vim
- extra_pkgs_bpo: [ ] # [ libreoffice ]
-
- roles:
- - up2date_debian
- - fvs-sssd
-
- tasks:
- - name: enable pam_mkhomedir.so
- lineinfile:
- dest: /etc/pam.d/common-session
- line: "session optional pam_mkhomedir.so umask=0027"
- insertbefore: "session optional pam_mount.so"
diff --git a/fvs-homex-server.yml b/fvs-homex-server.yml
deleted file mode 100644
index 28d4ada..0000000
--- a/fvs-homex-server.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-## This playbook deploys a FvS homex server machine.
----
-- name: apply configuration to the homex server
- hosts: all
- remote_user: ansible
- become: yes
- vars:
- extra_pkgs:
- - vim
- - systemd-journal-remote
- - python3-ldap
- extra_pkgs_bpo: [ ]
-
- roles:
- - up2date_debian
- - fvs-sssd
- - exam_homes
diff --git a/fvs-vm-server.yml b/fvs-vm-server.yml
deleted file mode 100644
index f8fe613..0000000
--- a/fvs-vm-server.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-## This playbook deploys a FvS VM server machine.
----
-- name: apply configuration to the VM server
- hosts: all
- remote_user: ansible
- become: yes
- vars:
- extra_pkgs:
- - vim
- - libvirt-daemon-system
- extra_pkgs_bpo: [ ] # [ libreoffice ]
-
- roles:
- - up2date_debian
- - fvs-sssd
-
- tasks:
- - name: enable pam_mkhomedir.so
- lineinfile:
- dest: /etc/pam.d/common-session
- line: "session optional pam_mkhomedir.so umask=0027"
- insertbefore: "session optional pam_mount.so"
-
- - name: allow all users to use VMs
- lineinfile:
- dest: /etc/libvirt/libvirtd.conf
- line: 'auth_unix_rw = "none"'
- insertafter: '#auth_unix_rw = "polkit"'
-
- - name: shared directory for ISO installer images
- file:
- path: /home/ISOsVM
- state: directory
- mode: '1777'
diff --git a/fvs-www-server.yml b/fvs-www-server.yml
deleted file mode 100644
index edf75e1..0000000
--- a/fvs-www-server.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-## This playbook deploys a FvS web server machine.
----
-- name: apply configuration to the web server
- hosts: all
- remote_user: ansible
- become: yes
- vars:
- extra_pkgs:
- - vim
- - apache2
- - python3-flask
-
- extra_pkgs_bpo: [ ] # [ libreoffice ]
-
- roles:
- - up2date_debian
- - fvs-sssd
-
- tasks:
- - name: enable pam_mkhomedir.so
- lineinfile:
- dest: /etc/pam.d/common-session
- line: "session optional pam_mkhomedir.so umask=0026"
- insertbefore: "session optional pam_mount.so"
-
- - name: enable apache mod userdir
- apache2_module:
- state: present
- name: userdir
diff --git a/host_vars/blackbox.yml b/host_vars/blackbox.yml
deleted file mode 100644
index a1f3799..0000000
--- a/host_vars/blackbox.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-allow_download: true
-backup_dirs_extra:
- - /home
-backup_opts_extra: ""
diff --git a/host_vars/bluebox.yml b/host_vars/bluebox.yml
deleted file mode 100644
index dacab7d..0000000
--- a/host_vars/bluebox.yml
+++ /dev/null
@@ -1 +0,0 @@
-allow_download: true
diff --git a/installbox.yml b/installbox.yml
deleted file mode 100644
index e4155f2..0000000
--- a/installbox.yml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-## This playbook deploys the installbox. Add 'hostname=XXX' and
-## 'domain=YYY' to the installer boot parameters to set hostname and
-## domain.
-
-- name: apply configuration to the installbox
- hosts: all
- remote_user: ansible
- become: true
-
- vars:
- ## This interface provides the default route:
- if_wan: "{{ ansible_default_ipv4.interface }}"
-
- ## Use the first remaining interface for the LAN:
- if_lan: "{{ ansible_interfaces | difference([if_wan, 'lo']) | first }}"
-
- ## LAN IP address range:
- ipaddr_lan: 192.168.0.10/24
- dhcp_start: 192.168.0.50
- dhcp_stop: 192.168.0.150
- in_inventory: 192.168.0.[50:150]
-
- di_dist: "{{ ansible_distribution_release }}"
- di_version: "{{ ansible_distribution_major_version }}"
- di_pkg: "debian-installer-{{ di_version }}-netboot-amd64"
-
- ansible_user: ansible
- repo_dir: "/home/{{ ansible_user }}/debian-lan"
- ansible_python_interpreter: "/usr/bin/python3" ## needed for firewalld module
-
-
- pre_tasks:
- - name: validate if interfaces are available
- fail:
- msg: "Interfaces {{ ansible_interfaces }} found. WAN: '{{ if_wan }}', LAN: '{{ if_lan }}'. Two NICs needed."
- when: (if_lan not in ansible_interfaces) or (if_wan not in ansible_interfaces) or (if_lan == if_wan)
-
-
- roles:
- - up2date_debian
- - firewalld2if
- - dnsmasq
- - netbootinstaller
- - aptcacher
- - prepare4clients
diff --git a/installbox6.yml b/installbox6.yml
deleted file mode 100644
index dc66943..0000000
--- a/installbox6.yml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-## This playbook deploys the installbox6. Add 'hostname=XXX' and
-## 'domain=YYY' to the installer boot parameters to set hostname and
-## domain.
-
-## FIXME: works only on bookworm (kea-dhcp6, atftpd)
-
-- name: apply configuration to the installbox6
- hosts: all
- remote_user: ansible
- become: true
-
- vars:
- ## This interface provides the default route:
- if_lan: "{{ ansible_default_ipv4.interface }}"
- prefix: '2001:db8:b001::/64'
-
- ## Find the IPv6 address: FIXME: not needed anymore?
- ipv6_lan: "{{ prefix | ipaddr('address') | slaac(ansible_default_ipv4.macaddress) }}"
-
- di_dist: "{{ ansible_distribution_release }}"
- di_version: 11 # "{{ ansible_distribution_major_version }}"
- di_pkg: "debian-installer-{{ di_version }}-netboot-amd64"
-
- extra_pkgs: [binutils] # FIXME: missing dependency in di-netboot-assistant
-
- ansible_user: ansible
- repo_dir: "/home/{{ ansible_user }}/debian-lan"
- ansible_python_interpreter: "/usr/bin/python3" ## needed for firewalld module
-
- roles:
- - up2date_debian
- - dhcp6radvdatftpd
- - netbootinstaller
- - aptcacher
- - prepare4clients
diff --git a/kerberox-client.yml b/kerberox-client.yml
deleted file mode 100644
index 567676e..0000000
--- a/kerberox-client.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-# This playbook deploys a client for the kerberox LAN.
-
-- name: apply configuration to the machines
- hosts: all
- remote_user: ansible
- become: true
- vars:
- extra_pkgs:
- - webext-privacy-badger
- - webext-ublock-origin
- - krb5-auth-dialog
- extra_pkgs_bpo: [] # [ libreoffice ]
- ansible_python_interpreter: "/usr/bin/python3"
-
- vars_prompt:
- - name: "kadmin_pwd"
- prompt: "Provide kadmin password to fetch kerberos keytab.\nLeave empty if done already"
- private: true
-
- roles:
- - up2date_debian
- - lanclient
- - kerberize
- ## Choose either gnome or KDE:
- # - gnome
- # - kde
diff --git a/kerberox.yml b/kerberox.yml
deleted file mode 100644
index 084ec74..0000000
--- a/kerberox.yml
+++ /dev/null
@@ -1,62 +0,0 @@
----
-## This playbook deploys the kerberox server. Add 'hostname=XXX' and
-## 'domain=YYY' to the installer boot parameters to set hostname and domain.
-
-- name: apply configuration to the kerberox server
- hosts: all
- remote_user: ansible
- become: true
-
- vars:
- ## This interface provides the default route:
- if_wan: "{{ ansible_default_ipv4.interface }}"
-
- ## Use the first remaining interface for the LAN:
- if_lan: "{{ ansible_interfaces | difference([if_wan, 'lo']) | first }}"
-
- ## LAN IP address range:
- ipaddr_lan: 192.168.0.10/24
- ipaddr_lan_threeoct: "{{ ipaddr_lan.split('.')[0:3] | join('.') }}"
- ipaddr_lan_ptr: "{{ (ipaddr_lan | ipaddr('revdns')).split('.')[1:] | join('.') }}"
- ipaddr_lan_ptr_threeoct: "{{ ipaddr_lan_ptr.split('.')[0:3] | join('.') }}"
- dhcp_start: 192.168.0.50
- dhcp_stop: 192.168.0.150
- in_inventory: 192.168.0.[50:150]
-
- di_dist: "{{ ansible_distribution_release }}"
- di_version: "{{ ansible_distribution_major_version }}"
- di_pkg: "debian-installer-{{ di_version }}-netboot-amd64"
-
- ansible_user: ansible
- repo_dir: "/home/{{ ansible_user }}/debian-lan"
- ansible_python_interpreter: "/usr/bin/python3" ## needed for firewalld module
-
-
- vars_prompt:
- - name: "foo_pwd"
- prompt:
- In case you would like to prepare a test user 'foo' and have
- not done so yet, provide foo's password here. Leave empty to
- just continue
- private: true
-
-
- pre_tasks:
- - name: validate if interfaces are available
- fail:
- msg: "Interfaces {{ ansible_interfaces }} found. WAN: '{{ if_wan }}', LAN: '{{ if_lan }}'. Two NICs needed."
- when: (if_lan not in ansible_interfaces) or (if_wan not in ansible_interfaces) or (if_lan == if_wan)
-
-
- roles:
- - up2date_debian
- - firewalld2if
- - dnsmasq
- - netbootinstaller
- - aptcacher
- - role: krb5kdcldap
- when: not run_in_installer|default(false)|bool
- - role: nfsserver
- when: not run_in_installer|default(false)|bool
- - prepare4clients
- - kerberize
diff --git a/kiosk.yml b/kiosk.yml
deleted file mode 100644
index 4e2126f..0000000
--- a/kiosk.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# This playbook deploys a kiosk-computer
-
-- name: apply configuration to the machines
- hosts: all
- remote_user: ansible
- become: true
- vars:
- auto_user: debi
- wifi_ssid: "YOUR SSID HERE"
- wifi_passwd: "YOUR WIFI-PW HERE"
- extra_pkgs:
- - webext-privacy-badger
- - webext-ublock-origin
- extra_pkgs_bpo: [] # [ libreoffice ]
-
- roles:
- - up2date_debian
- ## Choose either gnome or KDE:
- - gnome
- # - kde
- - kiosk
diff --git a/livebox.yml b/livebox.yml
deleted file mode 100644
index 81d0916..0000000
--- a/livebox.yml
+++ /dev/null
@@ -1,89 +0,0 @@
-## This playbook deploys the LiveBox.
-##
-## The LiveBox provides Debian Live and Installer images on top
-## of an already existing network with minimal modifications to
-## existing infrastructure. It does not provide DHCP; the idea
-## is to chainload the LiveBox' menu (iPXE or Grub) from PXE
-## infrastructure already in place.
-##
-## To chainload the LiveBox in iPXE use:
-## > item livebox Chainload Menu from LiveBox
-## > …
-## > :livebox chain tftp://livebox.lan/d-i/n-a/menu.ipxe
-##
-## To chainload the LiveBox in Grub use:
-## > menuentry 'Chainload Menu from LiveBox' {
-## > configfile (tftp,livebox.lan)/d-i/n-a/grub/grub.cfg
-## > }
-##
----
-- name: apply configuration to the livebox
- hosts: all
- remote_user: ansible
- become: true
-
- vars:
- extra_pkgs:
- - lighttpd
- - nfs-kernel-server
- extra_pkgs_bpo:
- - atftpd
- - di-netboot-assistant
- - apt-cacher-ng
-
- live_desktop:
- - gnome
- - kde
- - standard
-
- live_url: 'https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid/'
-
- # The edulive role generates customized Debian-Live images.
- # Make sure you have sufficient disk space available (~30GiB?).
- build_images:
- - gnome-edu
-
- di_dist: "{{ ansible_distribution_release }}"
- di_version: "{{ ansible_distribution_major_version }}"
- di_pkg: "debian-installer-{{ di_version }}-netboot-amd64"
- boot_params:
- - boot=live
- - netboot=nfs
- - components
- - locales=de_DE.UTF-8
- - keyboard-layouts=de
- - quiet
- - splash
-# - noroot
-
- ansible_python_interpreter: "/usr/bin/python3"
-
- pre_tasks:
- - name: preseed atftpd
- debconf:
- name: atftpd
- question: atftpd/basedir
- value: /var/lib/tftpboot
- vtype: string
-
- - name: find available iso images
- uri:
- url: "{{ live_url }}"
- return_content: true
- register: idx
-
- - name: find and set ISO image version
- set_fact:
- version: "{{ idx.content | regex_findall('debian-live-(\\d+\\.\\d+\\.\\d+)-amd64-', '\\1') | first }}"
-
- - name: define ISO image map
- set_fact:
- live_iso: "{{ live_iso | default({}) | combine({ item: 'debian-live-' + version + '-amd64-' + item + '+nonfree.iso' }) }}"
- loop: "{{ live_desktop }}"
-
- roles:
- - up2date_debian
- - netbootinstaller
- - aptcacher
- - debianlive
- - edulive
diff --git a/lmn-teacher.yml b/lmn-teacher.yml
deleted file mode 100644
index 0a5cc4d..0000000
--- a/lmn-teacher.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-## This playbook deploys a KDE teacher's laptop machine for LinuxMuster.
----
-- name: apply configuration to the machines
- hosts: all
- remote_user: ansible
- become: yes
- pre_tasks:
- - name: Preseed unattended-upgrades
- debconf:
- name: unattended-upgrades
- question: unattended-upgrades/enable_auto_updates
- value: True
- vtype: boolean
-
- vars:
- domain: "{{ ansible_domain }}"
- kerberize_uris: steinbeis.schule
- apt_conf: Acquire::http::Proxy "http://aptcache.pn.steinbeis.schule:3142/";
- ntp_serv: server.pn.steinbeis.schule
- proxy: http://firewall.pn.steinbeis.schule:3128
- no_proxy: firewall.pn.steinbeis.schule,server.pn.steinbeis.schule,idam.steinbeis.schule,dw.steinbeis.schule,.pn.steinbeis.schule,.steinbeis.schule
-
- ## PAM mount nextcloud, remove or leave empty to skip:
- web_dav: https://nc.steinbeis.schule/remote.php/dav/files/%(USER)
-
- ## Local mirror for mscorefonts. Remove or leave empty to use no mirror:
- mirror_msfonts: http://livebox.pn.steinbeis.schule/mscorefonts/
-
- rsyncsecret: Muster!
- keys2deploy:
- - 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKOY0hChWaCDtuiuQcM0v4/u1499esjTtnMjl4uYlnS0 andi@netboot'
- - 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAN5ylqP936MPjGNxzrzV5jMwIfMhKJdOGuVh3xGQKTM andi@yogi'
- - 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHxgeu7Rpb/1++531+MopqP9haUkyh1XXpv5kmbgSjx6'
- - 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbdOT+WSDmsBcaVFfzPRcmvOfd3CqO/FBOH44UVm7c7 raphael@uranus'
- - 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGICjy88HnMg5oaz4BJ20hgzqFWSem+HHD2PQ+As42pA raphael@pluto'
- - 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKm9lu9dDo5TG99QWTkl2G5G+ZbYikLlRNOXfs/bRTHy sascha@america'
- - 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMR4TP7jE+wS7zcH0iUBmlxCbvy9saYeEjonX/0yYfEJ daniel@NB-20-DW'
-
- ## Use grub-mkpasswd-pbkdf2 to calculate the password hash:
- grub_pwd: 'grub.pbkdf2.sha512.10000.FB60266F69FB181327AFB76193192454FC64151559EFF4D6B8FB7C7904A2A9C4778EDD515B46F770DB6A009F36903C193917BBBC571C5B6AAB2A69208BE01A6E.7B82114A0239C0EC55A50E95C48FA74A8910DEE4088447786DAB35770B9C2CF2D1550CF3B7452155EB55D5F84E5D357BF12B8D299CF9B01BF5D71D516CF826DB'
- nfs4: false
- extra_pkgs:
- - vim
- - mc
- - tmux
- - krb5-user
- - unattended-upgrades
- - debconf-utils
- extra_pkgs_bpo: [] # [ linux-image-amd64 ]
-
- roles:
- - lmn_network
- - up2date_debian
- - lmn_sssd
- - lmn_kde
- - lmn_fvs ## school specific customization
-# - lmn_vm
- - kerberize
-# - lmn_security
-
- tasks:
- - name: enable pam_mkhomedir.so
- lineinfile:
- dest: /etc/pam.d/common-session
- line: "session optional pam_mkhomedir.so umask=0022"
- insertbefore: "# end of pam-auth-update config"
- - name: Fix unattended-upgrades
- ansible.builtin.copy:
- dest: /etc/apt/apt.conf.d/20auto-upgrades
- content: |
- APT::Periodic::Update-Package-Lists "1";
- APT::Periodic::Unattended-Upgrade "1";
diff --git a/minimal-krb5.yml b/minimal-krb5.yml
deleted file mode 100644
index 225abef..0000000
--- a/minimal-krb5.yml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-# This playbook does almost nothing. Useful for testing only preseeding.
-
-- name: apply a minimal configuration with kerberos LAN integration
- hosts: all
- remote_user: ansible
- become: true
- roles:
- - up2date_debian
- - lan-client
diff --git a/minimal.yml b/minimal.yml
deleted file mode 100644
index 9cdf982..0000000
--- a/minimal.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-# This playbook does almost nothing. Useful for testing only preseeding.
-
-- name: apply a minimal configuration to the machine
- hosts: all
- remote_user: ansible
- become: true
- roles:
- - up2date_debian
diff --git a/roles/aptcacher/handlers/main.yml b/roles/aptcacher/handlers/main.yml
deleted file mode 100644
index 2d70698..0000000
--- a/roles/aptcacher/handlers/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-- name: start apt-cacher-ng
- service: name=apt-cacher-ng state=started enabled=yes
- listen: "start apt-cacher-ng"
diff --git a/roles/aptcacher/tasks/main.yml b/roles/aptcacher/tasks/main.yml
deleted file mode 100644
index b1f0ae3..0000000
--- a/roles/aptcacher/tasks/main.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-- name: install apt-cacher-ng package
- apt:
- name:
- - apt-cacher-ng
- - auto-apt-proxy
- state: latest # noqa package-latest
-
-- name: check if preseeded installer is available
- stat: path={{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg
- register: preseedcfg
-
-- name: enable apt-cacher-ng for install-clients
- replace:
- dest: "{{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg"
- regexp: '^d-i mirror/http/proxy string$'
- replace: 'd-i mirror/http/proxy string http://{{ ansible_hostname }}:3142/'
- when: preseedcfg.stat.exists
-
-- name: test if firewalld is available
- stat: path=/usr/sbin/firewalld
- register: firewalld
-
-- name: allow apt-cacher-ng service in firewalld
- firewalld:
- zone: internal
- port: 3142/tcp
- permanent: true
- immediate: true
- state: enabled
- when: not run_in_installer|default(false)|bool and firewalld.stat.exists
-
-- name: allow apt-cacher-ng service in firewalld, offline
- command: "firewall-offline-cmd --zone=internal --add-port=3142/tcp"
- when: run_in_installer|default(false)|bool and firewalld.stat.exists
-
-- name: flush handler to make apt-cacher available
- meta: flush_handlers
diff --git a/roles/backup/defaults/main.yml b/roles/backup/defaults/main.yml
deleted file mode 100644
index 680efc2..0000000
--- a/roles/backup/defaults/main.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-borg_pwd: "{{ lookup('password', '/tmp/borg.pwd chars=ascii_letters,digits length=32') }}"
-borg_pwd_file: "/root/borg.pwd"
-borg_key_backup: "/root/borg-key.backup"
-
-## alternative: "ssh://user@host:port/path/to/repo"
-backup_repo: "/var/backups/mnt/backup/borg"
-
-backup_dirs_extra: ""
-
-backup_opts: "--exclude-caches"
-backup_opts_extra: ""
-
-www_root: "/var/www"
-nc_dir: "{{ www_root }}/nextcloud"
-data_dir: "/var/nc-data"
diff --git a/roles/backup/files/backup.service b/roles/backup/files/backup.service
deleted file mode 100644
index 6f653c2..0000000
--- a/roles/backup/files/backup.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Run backup script
-
-[Service]
-Type=simple
-ExecStart=/usr/local/bin/backup
diff --git a/roles/backup/files/backup.timer b/roles/backup/files/backup.timer
deleted file mode 100644
index 866729d..0000000
--- a/roles/backup/files/backup.timer
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Run backup script daily
-
-[Timer]
-OnCalendar=*-*-* 4:00:00
-Persistent=true
-AccuracySec=15min
-
-[Install]
-WantedBy=timers.target
diff --git a/roles/backup/handlers/main.yml b/roles/backup/handlers/main.yml
deleted file mode 100644
index 3a4f8f6..0000000
--- a/roles/backup/handlers/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-- name: enable backup.service and .timer
- systemd:
- name: backup.timer
- state: started
- enabled: true
- listen: "enable backup.timer"
diff --git a/roles/backup/tasks/main.yml b/roles/backup/tasks/main.yml
deleted file mode 100644
index f263d5c..0000000
--- a/roles/backup/tasks/main.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-- name: install borg
- apt:
- name: borgbackup
- state: latest # noqa package-latest
-
-- name: check if borg password is available
- stat: path="{{ borg_pwd_file }}"
- register: borg
-
-- name: dump borg password
- shell: echo -n "{{ borg_pwd }}" > "{{ borg_pwd_file }}" ; chmod 0600 "{{ borg_pwd_file }}"
- no_log: true
- when: not borg.stat.exists
-
-- name: provide backup script
- template:
- src: "backup"
- dest: "/usr/local/bin/backup"
- mode: "0750"
-
-- name: provide backup.service and .timer
- copy:
- src: "{{ item }}"
- dest: "/etc/systemd/system/{{ item }}"
- mode: 0644
- with_items:
- - backup.service
- - backup.timer
- notify: "enable backup.timer"
-
-- name: run first backup
- command: /usr/local/bin/backup
- when: not borg.stat.exists
diff --git a/roles/backup/templates/backup b/roles/backup/templates/backup
deleted file mode 100755
index 1cc3c5c..0000000
--- a/roles/backup/templates/backup
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-set -eu
-
-BACKUP=({{ backup_dirs|join(' ') }} {{ backup_dirs_extra|join(' ') }})
-OPTIONS=({{ backup_opts }} {{ backup_opts_extra }})
-
-export BORG_REPO="{{ backup_repo }}"
-export BORG_PASSCOMMAND="cat {{ borg_pwd_file }}"
-KEY_BACKUP="{{ borg_key_backup }}"
-
-MOUNTED=""
-
-MNT="$(echo "$BORG_REPO" | sed "s|\(^.*/mnt\).*|\1|")"
-if grep -q "$MNT" /etc/fstab ; then
- [ -d "$BORG_REPO" ] || mount -v "$MNT" && MOUNTED="TRUE"
-fi
-
-if [ ! -e "$KEY_BACKUP" ] ; then
- [[ "$BORG_REPO" =~ @ ]] || mkdir -vp --mode=0750 "$BORG_REPO"
- borg init --encryption=repokey
- borg key export "$BORG_REPO" "$KEY_BACKUP"
-fi
-
-if [ -e "{{ nc_dir }}/config/config.php" ] ; then
- NCDB="{{ data_dir }}/nextcloud-database.dump"
- sudo -u www-data /usr/bin/php {{ nc_dir }}/occ maintenance:mode --on
- PW="$(grep dbpassword {{ nc_dir }}/config/config.php | \
- sed -e "s/\W*'dbpassword' => '//" -e "s/',$//")"
-
- echo -n "Dumping data base into '$NCDB' … "
- mysqldump --single-transaction -h localhost -u nextcloud -p"$PW" nextcloud > "$NCDB"
- chmod 600 "$NCDB"
- echo "done."
-fi
-
-echo "Backup ${BACKUP[@]} to $BORG_REPO."
-borg create -v --show-rc "${OPTIONS[@]}" ::'{hostname}-{now}' "${BACKUP[@]}"
-
-borg prune -v --list --prefix='{hostname}-' --show-rc \
- --keep-daily 14 \
- --keep-weekly 8 \
- --keep-monthly 6 \
- --keep-yearly 10
-
-if [ -e "{{ nc_dir }}/config/config.php" ] ; then
- sudo -u www-data /usr/bin/php {{ nc_dir }}/occ maintenance:mode --off
-fi
-
-if [ "$MOUNTED" = "TRUE" ] ; then
- umount -v "$MNT"
-fi
diff --git a/roles/ddnsupdate/files/ddns-update b/roles/ddnsupdate/files/ddns-update
deleted file mode 100755
index 00c4bc8..0000000
--- a/roles/ddnsupdate/files/ddns-update
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-set -eu
-
-. /etc/ddns-update/ddns-update.conf
-
-DDHOST="https://www.ddnss.de/upd.php"
-
-if ! DNSRESULT="$(host $DDNSNAME)" ; then
- echo "Could not resolve IP address for '$DDNSNAME', no update."
- exit 0
-fi
-
-DNSIP4="$(echo "$DNSRESULT" | grep -m 1 -oE '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$' || true )"
-DNSIP6="$(echo "$DNSRESULT" | grep -m 1 -oE '[0-9a-f]{1,4}:.+:[0-9a-f]{1,4}' || true )"
-
-REALIP4="$(wget -q -O - https://ip4.ddnss.de/meineip.php | \
- grep -m 1 -oE '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' || true )"
-REALIP6="$(wget -q -O - https://ip6.ddnss.de/meineip.php | \
- grep -m 1 -oE '[0-9a-f]{1,4}:.+:[0-9a-f]{1,4}' || true )"
-
-if [ -z "$REALIP4" -a -z "$REALIP6" ] ; then
- echo "Could not detect real IP addresses, exiting."
- exit 0
-fi
-
-echo "Current DNS: IPv4=$DNSIP4, IPv6=$DNSIP6."
-echo "Detected: IPv4=$REALIP4, IPv6=$REALIP6."
-
-if [ "$REALIP4" == "$DNSIP4" -a "$REALIP6" == "$DNSIP6" ] ; then
- echo "IP address unchanged, no update."
-else
- echo "IP address changed: $DNSIP4 → ${REALIP4}, $DNSIP6 → ${REALIP6}, updating ddns."
- wget -q -O - $DDHOST'?key='$KEYAUTH'&host='$DDNSNAME'&ip='$REALIP4'&ip6='$REALIP6 \
- | grep -oE "Updated .+ hostname." || echo "Update not confirmed, it might have failed."
-fi
diff --git a/roles/ddnsupdate/files/ddns-update.service b/roles/ddnsupdate/files/ddns-update.service
deleted file mode 100644
index 6c1da59..0000000
--- a/roles/ddnsupdate/files/ddns-update.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Update ddns
-
-[Service]
-Type=oneshot
-ExecStart=/usr/local/bin/ddns-update
diff --git a/roles/ddnsupdate/files/ddns-update.timer b/roles/ddnsupdate/files/ddns-update.timer
deleted file mode 100644
index 0fb72ec..0000000
--- a/roles/ddnsupdate/files/ddns-update.timer
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Update ddns IP-address
-
-[Timer]
-OnBootSec=0
-OnUnitActiveSec=20min
-AccuracySec=3min
-
-
-[Install]
-WantedBy=timers.target
diff --git a/roles/ddnsupdate/handlers/main.yml b/roles/ddnsupdate/handlers/main.yml
deleted file mode 100644
index 1022036..0000000
--- a/roles/ddnsupdate/handlers/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: enable ddns-update timer
- systemd:
- name: ddns-update.timer
- state: restarted
- daemon_reload: true
- enabled: true
- listen: "enable ddns-update timer"
diff --git a/roles/ddnsupdate/tasks/main.yml b/roles/ddnsupdate/tasks/main.yml
deleted file mode 100644
index a345036..0000000
--- a/roles/ddnsupdate/tasks/main.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-- name: make sure /etc/ddns-update/ exists
- file: path=/etc/ddns-update/ state=directory recurse=yes
-
-- name: install ddns-update config
- template:
- src: ddns-update.conf.j2
- dest: /etc/ddns-update/ddns-update.conf
- mode: 0644
-
-- name: install ddns-update script
- copy:
- src: ddns-update
- dest: /usr/local/bin/ddns-update
- mode: 0755
-
-- name: install ddns-update.service
- copy:
- src: ddns-update.service
- dest: /etc/systemd/system/ddns-update.service
- mode: 0644
-
-- name: install ddns-update.timer
- copy:
- src: ddns-update.timer
- dest: /etc/systemd/system/ddns-update.timer
- mode: 0644
- notify: enable ddns-update timer
diff --git a/roles/ddnsupdate/templates/ddns-update.conf.j2 b/roles/ddnsupdate/templates/ddns-update.conf.j2
deleted file mode 100644
index cd84e74..0000000
--- a/roles/ddnsupdate/templates/ddns-update.conf.j2
+++ /dev/null
@@ -1,2 +0,0 @@
-DDNSNAME="{{ ddns_domain }}"
-KEYAUTH="{{ ddns_updkey }}"
diff --git a/roles/debianlive/handlers/main.yml b/roles/debianlive/handlers/main.yml
deleted file mode 100644
index affc752..0000000
--- a/roles/debianlive/handlers/main.yml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: rebuild di-netboot assistant menu
- command:
- cmd: di-netboot-assistant rebuild-menu
- listen: rebuild di-netboot menu
-
-- name: export nfs
- command:
- cmd: exportfs -ra
- listen: export nfs
diff --git a/roles/debianlive/tasks/main.yml b/roles/debianlive/tasks/main.yml
deleted file mode 100644
index 1def349..0000000
--- a/roles/debianlive/tasks/main.yml
+++ /dev/null
@@ -1,128 +0,0 @@
----
-- name: download debian-live images
- get_url:
- url: "{{ live_url }}{{ item.value }}"
- dest: "/var/cache/di-netboot-assistant/{{ item.value }}"
- checksum: "sha256:{{ live_url }}/SHA256SUMS"
- register: new_iso
- loop:
- "{{ live_iso | dict2items }}"
-
-- name: umount old iso images
- mount:
- path: "/var/lib/tftpboot/d-i/n-live/{{ item.key }}"
- state: unmounted
- loop:
- "{{ live_iso | dict2items }}"
- when: new_iso.changed
-
-- name: prepare live image directory
- file:
- path: "/var/lib/tftpboot/d-i/n-live/{{ item.key }}"
- state: directory
- mode: 0755
- loop:
- "{{ live_iso | dict2items }}"
-
-- name: make sure loop module is loaded
- modprobe:
- name: loop
- state: present
-
-- name: loop mount iso images
- mount:
- path: "/var/lib/tftpboot/d-i/n-live/{{ item.key }}"
- src: "/var/cache/di-netboot-assistant/{{ item.value }}"
- fstype: iso9660
- opts: loop,ro,nofail
- state: mounted
- loop:
- "{{ live_iso | dict2items }}"
- notify: rebuild di-netboot menu
-
-- name: prepare http downloads
- file:
- src: "/var/lib/tftpboot/d-i/"
- dest: "/var/www/html/d-i"
- state: link
-
-- name: export live image squashfs
- lineinfile:
- path: /etc/exports
- line: "/var/lib/tftpboot/d-i/n-live/ *(ro,crossmnt,no_subtree_check)"
- notify: export nfs
-
-- name: configure ipxe boot menu address and headline
- replace:
- path: /etc/di-netboot-assistant/ipxemenu.HEAD
- regexp: "{{ item.reg }}"
- replace: "{{ item.rep }}"
- loop:
- - reg: '^set 210:string .+$'
- rep: 'set 210:string http://{{ ansible_default_ipv4.address }}/'
- - reg: '^#(item --gap -- -- Customized Boot Entries.*)$'
- rep: '\1'
- notify: rebuild di-netboot menu
-
-- name: configure grub boot menu addresses
- lineinfile:
- path: /etc/di-netboot-assistant/grub.cfg.HEAD
- line: "{{ item.line }}"
- regexp: "{{ item.reg }}"
- loop:
- - line: "set root=(http,{{ ansible_default_ipv4.address }})"
- reg: "^set root="
- - line: "set pxe_default_server={{ ansible_default_ipv4.address }}"
- reg: "^set pxe_default_server="
- notify: rebuild di-netboot menu
-
-- name: prepare debian live nfs boot entry title
- lineinfile:
- path: /etc/di-netboot-assistant/ipxemenu.HEAD
- insertafter: '-- Customized Boot Entries --'
- line: "item {{ item.key }} Debian GNU/Linux {{ item.key }} NFS"
- loop:
- "{{ live_iso | dict2items }}"
- notify: rebuild di-netboot menu
-
-- name: find kernel version
- shell:
- cmd: >-
- basename /var/lib/tftpboot/d-i/n-live/{{ item.key }}/live/vmlinuz*
- | sed "s/vmlinuz-//"
- register: images
- changed_when: false
- loop:
- "{{ live_iso | dict2items }}"
-
-- name: prepare debian live boot loader ipxe
- blockinfile:
- path: /etc/di-netboot-assistant/ipxemenu.HEAD
- marker: "# {mark} ANSIBLE MANAGED BLOCK {{ item.item.key }}"
- block: |
- :{{ item.item.key }}
- echo Booting Debian GNU/Linux {{ item.item.key }} NFS
- kernel ${210:string}d-i/n-live/{{ item.item.key }}/live/vmlinuz-{{ item.stdout }} \
- initrd=initrd.img-{{ item.stdout }} {{ boot_params|join(' ') }} \
- nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/{{ item.item.key }}/
- initrd ${210:string}d-i/n-live/{{ item.item.key }}/live/initrd.img-{{ item.stdout }}
- boot
- loop:
- "{{ images.results }}"
- notify: rebuild di-netboot menu
-
-- name: prepare debian live boot loader grub
- blockinfile:
- path: /etc/di-netboot-assistant/grub.cfg.HEAD
- insertbefore: "^menuentry 'Boot from local disk..'"
- marker: "# {mark} ANSIBLE MANAGED BLOCK {{ item.item.key }}"
- block: |
- menuentry 'Debian GNU/Linux Live {{ item.item.key }} NFS' {
- linux (http,{{ ansible_default_ipv4.address }})/d-i/n-live/{{ item.item.key }}/live/vmlinuz-{{ item.stdout }} \
- {{ boot_params|join(' ') }} \
- nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/{{ item.item.key }}/
- initrd (http,{{ ansible_default_ipv4.address }})/d-i/n-live/{{ item.item.key }}/live/initrd.img-{{ item.stdout }}
- }
- loop:
- "{{ images.results }}"
- notify: rebuild di-netboot menu
diff --git a/roles/dhcp6radvdatftp/handlers/main.yml b/roles/dhcp6radvdatftp/handlers/main.yml
deleted file mode 100644
index 897fb0d..0000000
--- a/roles/dhcp6radvdatftp/handlers/main.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: restart radvd
- systemd:
- name: radvd.service
- state: restarted
- enabled: true
- listen: restart radvd
-
-- name: restart kea-dhcp6-server
- systemd:
- name: kea-dhcp6-server.service
- state: restarted
- enabled: true
- listen: restart kea-dhcp6-server
-
-- name: restart network interfaces
- systemd:
- name: networking
- state: restarted
- listen: reconfigure network
diff --git a/roles/dhcp6radvdatftp/tasks/main.yml b/roles/dhcp6radvdatftp/tasks/main.yml
deleted file mode 100644
index 17ecd17..0000000
--- a/roles/dhcp6radvdatftp/tasks/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-## DHCPv6, RAs and TFTP
----
-- name: preseed aftpd
- debconf:
- name: atftpd
- question: atftpd/basedir
- value: /var/lib/tftpboot
- vtype: string
-
-- name: install di-netboot-assistant and installer package
- apt:
- name:
- - kea-dhcp6-server
- - radvd
- - atftpd
- state: latest # noqa package-latest
-
-- name: configure radvd
- template:
- src: radvd.conf.j2
- dest: /etc/radvd.conf
- mode: 0644
- notify: restart radvd
-
-- name: configure kea-dhcp-server
- template:
- src: kea-dhcp6.conf.j2
- dest: /etc/kea/kea-dhcp6.conf
- mode: 0644
- notify: restart kea-dhcp6-server
-
-- name: set IPv6 address on interface
- blockinfile:
- path: /etc/network/interfaces
- block: |
- allow-hotplug {{ if_lan }}
- iface {{ if_lan }} inet6 static
- address 2001:db8:b001::1/64
- notify: reconfigure network
diff --git a/roles/dhcp6radvdatftp/templates/kea-dhcp6.conf.j2 b/roles/dhcp6radvdatftp/templates/kea-dhcp6.conf.j2
deleted file mode 100644
index 305bde1..0000000
--- a/roles/dhcp6radvdatftp/templates/kea-dhcp6.conf.j2
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "Dhcp6": {
- "interfaces-config": {
- "interfaces": [ "{{ if_lan }}" ]
- },
- "option-data": [
- {
- "name": "bootfile-url",
- "data": "tftp://[2001:db8:b001::1]/d-i/n-a/grubx64.efi"
- }
- ],
- "subnet6": [
- {
- "subnet": "2001:db8:b001::/64",
- "pools": [ { "pool": "2001:db8:b001::2 - 2001:db8:b001::ffff" } ],
- "interface": "enp1s0"
- }
- ]
- }
-}
diff --git a/roles/dhcp6radvdatftp/templates/radvd.conf.j2 b/roles/dhcp6radvdatftp/templates/radvd.conf.j2
deleted file mode 100644
index 2d52dc2..0000000
--- a/roles/dhcp6radvdatftp/templates/radvd.conf.j2
+++ /dev/null
@@ -1,10 +0,0 @@
-interface {{ if_lan }}
-{
- AdvSendAdvert on;
- AdvManagedFlag on;
- AdvOtherConfigFlag on;
-
- prefix {{ prefix }}
- {
- };
-};
diff --git a/roles/dnsdhcptftp/defaults/main.yml b/roles/dnsdhcptftp/defaults/main.yml
deleted file mode 100644
index d91fadf..0000000
--- a/roles/dnsdhcptftp/defaults/main.yml
+++ /dev/null
@@ -1 +0,0 @@
-name_servers: ns1.{{ ansible_domain }}
diff --git a/roles/dnsdhcptftp/handlers/main.yml b/roles/dnsdhcptftp/handlers/main.yml
deleted file mode 100644
index 1f48f0f..0000000
--- a/roles/dnsdhcptftp/handlers/main.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-- name: restart isc-dhcp-server
- systemd: name=isc-dhcp-server state=restarted enabled=yes
- listen: restart isc-dhcp-server
-
-- name: restart bind
- systemd: name=bind9 state=restarted enabled=yes
- listen: restart bind
-
-- name: restart tftpd-hpa
- systemd: name=tftpd-hpa state=restarted enabled=yes
- listen: restart tftpd-hpa
-
-- name: restart dhcp-client
- systemd: name=ifup@{{ if_wan }} state=restarted enabled=yes
- listen: restart dhcp-client
diff --git a/roles/dnsdhcptftp/tasks/main.yml b/roles/dnsdhcptftp/tasks/main.yml
deleted file mode 100644
index 8eb02e3..0000000
--- a/roles/dnsdhcptftp/tasks/main.yml
+++ /dev/null
@@ -1,100 +0,0 @@
----
-- name: preseed tftpd-hpa
- debconf:
- name: tftpd-hpa
- question: tftpd-hpa/directory
- value: /var/lib/tftpboot
- vtype: string
-
-- name: install tftpd, dhcpd and named packages
- apt:
- name:
- - isc-dhcp-server
- - tftpd-hpa
- - bind9
- state: latest # noqa package-latest
-
-## FIXME: preseeding seems to be ignored
-- name: configure TFTP root directory
- replace:
- path: /etc/default/tftpd-hpa
- regexp: '^TFTP_DIRECTORY=".*"$'
- replace: 'TFTP_DIRECTORY="/var/lib/tftpboot"'
- notify: restart tftpd-hpa
-
-- name: serve dhcp on LAN interface
- replace:
- path: /etc/default/isc-dhcp-server
- regexp: '^INTERFACESv4=".*"$'
- replace: 'INTERFACESv4="{{ if_lan }}"'
- notify: restart isc-dhcp-server
-
-- name: deploy config files for isc-dhcp-server
- template:
- src: dhcpd.conf.j2
- dest: /etc/dhcp/dhcpd.conf
- mode: 0644
- backup: true
- notify: restart isc-dhcp-server
-
-- name: deploy config files for bind9
- template:
- src: "{{ item.src }}.j2"
- dest: "/etc/bind/{{ item.dest }}"
- mode: 0644
- loop:
- - src: db.RR
- dest: "db.{{ ansible_domain }}"
- - src: db.RRinv
- dest: "db.{{ ipaddr_lan_threeoct }}"
- - src: localzones
- dest: localzones
- notify: restart bind
-
-- name: link zone files to writeable directory for DDNS
- file:
- src: "/etc/bind/{{ item }}"
- dest: "/var/lib/bind/{{ item }}"
- state: link
- loop:
- - "db.{{ ansible_domain }}"
- - "db.{{ ipaddr_lan_threeoct }}"
- notify: restart bind
-
-- name: enable local bind config
- lineinfile:
- path: /etc/bind/named.conf.local
- line: 'include "/etc/bind/localzones";'
- notify: restart bind
-
-- name: adapt resolv.conf
- template:
- src: resolv.conf.j2
- dest: /etc/resolv.conf
- mode: 0644
- notify: restart isc-dhcp-server
-
-## stop dhclient from overwriting /etc/resolv.conf:
-- name: supersede dhcp client data
- blockinfile:
- dest: /etc/dhcp/dhclient.conf
- block: |
- supersede domain-search "{{ ansible_domain }}";
- supersede domain-name-servers 127.0.0.1;
- insertbefore: "#send dhcp-client-identifier.*"
- notify: restart dhcp-client
-
-- name: generate rndc key
- command:
- cmd: rndc-confgen -a
- creates: /etc/bind/rndc.key
-
-- name: copy rndc key
- copy:
- src: /etc/bind/rndc.key
- dest: /etc/dhcp/
- owner: root
- group: root
- mode: 0640
- remote_src: true
- notify: restart isc-dhcp-server
diff --git a/roles/dnsdhcptftp/templates/db.RR.j2 b/roles/dnsdhcptftp/templates/db.RR.j2
deleted file mode 100644
index 3bc6776..0000000
--- a/roles/dnsdhcptftp/templates/db.RR.j2
+++ /dev/null
@@ -1,17 +0,0 @@
-$TTL 500
-@ IN SOA {{ ansible_fqdn }}. root.{{ ansible_domain }}. (
- 1 ; Serial
- 3600 ; Refresh
- 1800 ; Retry
- 720000 ; Expire
- 6400 ) ; Negative Cache TTL
-;
-@ NS {{ ansible_fqdn }}.
- MX 10 {{ ansible_fqdn }}.
-{{ ansible_hostname }} A {{ ipaddr_lan | ipaddr("address") }}
-_ldap._tcp SRV 100 0 389 {{ ansible_fqdn }}.
-ns1 CNAME {{ ansible_fqdn }}.
-ns2 CNAME {{ ansible_fqdn }}.
-aptcache CNAME {{ ansible_fqdn }}.
-homes CNAME {{ ansible_fqdn }}.
-ldap CNAME {{ ansible_fqdn }}.
diff --git a/roles/dnsdhcptftp/templates/db.RRinv.j2 b/roles/dnsdhcptftp/templates/db.RRinv.j2
deleted file mode 100644
index 3f942c1..0000000
--- a/roles/dnsdhcptftp/templates/db.RRinv.j2
+++ /dev/null
@@ -1,11 +0,0 @@
-$TTL 500
-@ IN SOA {{ ansible_fqdn }}. root.{{ ansible_domain }}. (
- 1 ; Serial
- 3600 ; Refresh
- 1800 ; Retry
- 720000 ; Expire
- 6400 ) ; Negative Cache TTL
-;
-@ NS {{ ansible_fqdn }}.
- MX 10 {{ ansible_fqdn }}.
-{{ ipaddr_lan | ipaddr("address") | regex_replace("^.*\.(.+$)", "\\1") }} PTR {{ ansible_fqdn }}.
diff --git a/roles/dnsdhcptftp/templates/dhcpd.conf.j2 b/roles/dnsdhcptftp/templates/dhcpd.conf.j2
deleted file mode 100644
index 1096ab3..0000000
--- a/roles/dnsdhcptftp/templates/dhcpd.conf.j2
+++ /dev/null
@@ -1,139 +0,0 @@
-# dhcpd.conf
-#
-# Sample configuration file for ISC dhcpd
-#
-
-# option definitions common to all supported networks...
-option domain-name "{{ ansible_domain }}";
-option domain-name-servers {{ name_servers }};
-
-default-lease-time 600;
-max-lease-time 7200;
-
-# The ddns-updates-style parameter controls whether or not the server will
-# attempt to do a DNS update when a lease is confirmed. We default to the
-# behavior of the version 2 packages ('none', since DHCP v2 didn't
-# have support for DDNS.)
-#ddns-update-style none;
-
-use-host-decl-names on;
-ddns-update-style standard;
-
-include "/etc/dhcp/rndc.key";
-
-zone {{ ansible_domain }}. {
- primary 127.0.0.1;
- key rndc-key;
-}
-
-zone {{ ipaddr_lan_ptr }} {
- primary 127.0.0.1;
- key rndc-key;
-}
-
-
-# If this DHCP server is the official DHCP server for the local
-# network, the authoritative directive should be uncommented.
-authoritative;
-
-# Use this to send dhcp log messages to a different log file (you also
-# have to hack syslog.conf to complete the redirection).
-#log-facility local7;
-
-## The tftpd server IP address, for all clients.
-next-server {{ ipaddr_lan | ipaddr("address") }};
-
-option arch code 93 = unsigned integer 16;
-if option arch = 00:07 {
- filename "d-i/n-a/bootnetx64.efi";
-} else {
- filename "d-i/n-a/pxelinux.0";
-}
-
-subnet {{ ipaddr_lan | ipaddr("network") }} netmask {{ ipaddr_lan | ipaddr("netmask") }} {
- option routers {{ ipaddr_lan | ipaddr("address") }};
- range {{ dhcp_start }} {{ dhcp_stop }};
-}
-
-
-# No service will be given on this subnet, but declaring it helps the
-# DHCP server to understand the network topology.
-
-#subnet 10.152.187.0 netmask 255.255.255.0 {
-#}
-
-# This is a very basic subnet declaration.
-
-#subnet 10.254.239.0 netmask 255.255.255.224 {
-# range 10.254.239.10 10.254.239.20;
-# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
-#}
-
-# This declaration allows BOOTP clients to get dynamic addresses,
-# which we don't really recommend.
-
-#subnet 10.254.239.32 netmask 255.255.255.224 {
-# range dynamic-bootp 10.254.239.40 10.254.239.60;
-# option broadcast-address 10.254.239.31;
-# option routers rtr-239-32-1.example.org;
-#}
-
-# A slightly different configuration for an internal subnet.
-#subnet 10.5.5.0 netmask 255.255.255.224 {
-# range 10.5.5.26 10.5.5.30;
-# option domain-name-servers ns1.internal.example.org;
-# option domain-name "internal.example.org";
-# option routers 10.5.5.1;
-# option broadcast-address 10.5.5.31;
-# default-lease-time 600;
-# max-lease-time 7200;
-#}
-
-# Hosts which require special configuration options can be listed in
-# host statements. If no address is specified, the address will be
-# allocated dynamically (if possible), but the host-specific information
-# will still come from the host declaration.
-
-#host passacaglia {
-# hardware ethernet 0:0:c0:5d:bd:95;
-# filename "vmunix.passacaglia";
-# server-name "toccata.example.com";
-#}
-
-# Fixed IP addresses can also be specified for hosts. These addresses
-# should not also be listed as being available for dynamic assignment.
-# Hosts for which fixed IP addresses have been specified can boot using
-# BOOTP or DHCP. Hosts for which no fixed address is specified can only
-# be booted with DHCP, unless there is an address range on the subnet
-# to which a BOOTP client is connected which has the dynamic-bootp flag
-# set.
-#host fantasia {
-# hardware ethernet 08:00:07:26:c0:a5;
-# fixed-address fantasia.example.com;
-#}
-
-# You can declare a class of clients and then do address allocation
-# based on that. The example below shows a case where all clients
-# in a certain class get addresses on the 10.17.224/24 subnet, and all
-# other clients get addresses on the 10.0.29/24 subnet.
-
-#class "foo" {
-# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
-#}
-
-#shared-network 224-29 {
-# subnet 10.17.224.0 netmask 255.255.255.0 {
-# option routers rtr-224.example.org;
-# }
-# subnet 10.0.29.0 netmask 255.255.255.0 {
-# option routers rtr-29.example.org;
-# }
-# pool {
-# allow members of "foo";
-# range 10.17.224.10 10.17.224.250;
-# }
-# pool {
-# deny members of "foo";
-# range 10.0.29.10 10.0.29.230;
-# }
-#}
diff --git a/roles/dnsdhcptftp/templates/localzones.j2 b/roles/dnsdhcptftp/templates/localzones.j2
deleted file mode 100644
index e71d0a7..0000000
--- a/roles/dnsdhcptftp/templates/localzones.j2
+++ /dev/null
@@ -1,17 +0,0 @@
-include "/etc/bind/rndc.key";
-
-zone "{{ ipaddr_lan_ptr[:-1] }}" {
- type master;
- notify no;
- file "/etc/bind/db.{{ ipaddr_lan_threeoct }}";
- journal "/var/lib/bind/db.{{ ipaddr_lan_threeoct }}.jnl";
- allow-update { key rndc-key; };
-};
-
-zone "{{ ansible_domain }}" {
- type master;
- notify no;
- file "/etc/bind/db.{{ ansible_domain }}";
- journal "/var/lib/bind/db.{{ ansible_domain }}.jnl";
- allow-update { key rndc-key; };
-};
diff --git a/roles/dnsdhcptftp/templates/resolv.conf.j2 b/roles/dnsdhcptftp/templates/resolv.conf.j2
deleted file mode 100644
index 36d45af..0000000
--- a/roles/dnsdhcptftp/templates/resolv.conf.j2
+++ /dev/null
@@ -1,2 +0,0 @@
-search {{ ansible_domain }}.
-nameserver 127.0.0.1
diff --git a/roles/dnsmasq/handlers/main.yml b/roles/dnsmasq/handlers/main.yml
deleted file mode 100644
index f549f18..0000000
--- a/roles/dnsmasq/handlers/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-- name: restart dnsmasq
- service: name=dnsmasq state=restarted enabled=yes
- listen: "restart dnsmasq"
diff --git a/roles/dnsmasq/tasks/main.yml b/roles/dnsmasq/tasks/main.yml
deleted file mode 100644
index 00f73a6..0000000
--- a/roles/dnsmasq/tasks/main.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-- name: check if dnsmasq is already there
- stat: path=/etc/dnsmasq.d/dnsmasq-dhcp
- register: dnsmasq
-
-- name: install dnsmasq package
- apt:
- name:
- - dnsmasq
- - resolvconf
- state: latest # noqa package-latest
-
-- name: configure dnsmasq dhcp
- template:
- src: dnsmasq-dhcp.j2
- dest: /etc/dnsmasq.d/dnsmasq-dhcp
- mode: 0644
- notify: "restart dnsmasq"
-
-- name: configure dnsmasq tftp
- template:
- src: dnsmasq-tftp-netboot-installer.j2
- dest: /etc/dnsmasq.d/tftp-netboot-installer
- mode: 0644
- notify: "restart dnsmasq"
diff --git a/roles/dnsmasq/templates/dnsmasq-dhcp.j2 b/roles/dnsmasq/templates/dnsmasq-dhcp.j2
deleted file mode 100644
index 77201cf..0000000
--- a/roles/dnsmasq/templates/dnsmasq-dhcp.j2
+++ /dev/null
@@ -1,3 +0,0 @@
-interface={{ if_lan }}
-dhcp-range={{ dhcp_start }},{{ dhcp_stop }},2h
-# dhcp-generate-names ## better use grub to generate names
diff --git a/roles/dnsmasq/templates/dnsmasq-tftp-netboot-installer.j2 b/roles/dnsmasq/templates/dnsmasq-tftp-netboot-installer.j2
deleted file mode 100644
index 2289ac9..0000000
--- a/roles/dnsmasq/templates/dnsmasq-tftp-netboot-installer.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-enable-tftp
-tftp-root={{ tftp_root }}
-dhcp-boot=d-i/n-a/pxelinux.0
-dhcp-match=set:efi-x86_64,option:client-arch,7
-dhcp-boot=tag:efi-x86_64,d-i/n-a/bootnetx64.efi
diff --git a/roles/educontainer/defaults/main.yml b/roles/educontainer/defaults/main.yml
deleted file mode 100644
index b58b8b7..0000000
--- a/roles/educontainer/defaults/main.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-## generate most of this list with 'tasksel --task-packages standard'
-cont_packages:
- - systemd-container
- - openssh-server
- - sudo
- - python3
- - auto-apt-proxy
- - bash-completion
- - ca-certificates
- - man-db
- - manpages
-
-cont_packages_extra: []
diff --git a/roles/educontainer/handlers/main.yml b/roles/educontainer/handlers/main.yml
deleted file mode 100644
index 70b52ec..0000000
--- a/roles/educontainer/handlers/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: enable and restart containers
- systemd:
- name: systemd-nspawn@{{ contname }}{{ "%02d" | format(item|int) }}.service
- state: restarted
- enabled: true
- loop: "{{ containers }}"
- listen: enable and restart containers
diff --git a/roles/educontainer/tasks/main.yml b/roles/educontainer/tasks/main.yml
deleted file mode 100644
index d5dfc93..0000000
--- a/roles/educontainer/tasks/main.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-## Prepare minimal systemd-nspawn containers for educational use.
-##
-## Port mapping to the host:
-##
-## container 0: ssh → host port 10000, HTTP → 10100
-## container 1: ssh → host port 10001, HTTP → 10101
-## ... ... ...
-##
-## User '{{ contuser }}' in the sudo group. Password is '{{ contpwd }}'.
-##
-
-- name: stop all containers
- systemd:
- name: systemd-nspawn@{{ contname }}{{ "%02d" | format(item|int) }}.service
- state: stopped
- loop: "{{ containers | reverse }}"
- tags:
- - never
- - stop
- - reset
- - purge
- - setup
- - restart
-
-- name: purge all containers
- command:
- cmd: machinectl remove {{ contname }}{{ "%02d" | format(item|int) }}
- removes: /var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}
- loop: "{{ containers | reverse }}"
- tags:
- - never
- - purge
- - setup
-
-- name: remove container overlay
- file:
- path: /var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}-delta
- state: absent
- loop: "{{ containers | reverse }}"
- tags:
- - never
- - reset
- - purge
- - setup
-
-- name: start all containers
- systemd:
- name: systemd-nspawn@{{ contname }}{{ "%02d" | format(item|int) }}.service
- state: started
- loop: "{{ containers | reverse }}"
- tags:
- - never
- - start
- - reset
- - restart
-
-###########
-
-- name: check if container template exists
- ansible.builtin.stat:
- path: "/var/lib/machines/{{ contname }}00"
- register: cont
- tags:
- - always
-
-- name: import setup.yml tasks
- import_tasks: setup.yml
- when: cont.stat.isdir is not defined
- tags:
- - always
diff --git a/roles/educontainer/tasks/setup.yml b/roles/educontainer/tasks/setup.yml
deleted file mode 100644
index aa117ee..0000000
--- a/roles/educontainer/tasks/setup.yml
+++ /dev/null
@@ -1,181 +0,0 @@
----
-
-- name: install packages
- apt:
- name:
- - systemd-container
- - debootstrap
- - auto-apt-proxy
- state: latest # noqa package-latest
-
-- name: prepare machine directory
- file:
- path: /var/lib/machines/
- state: directory
- mode: 0700
-
-- name: debootstrap base system
- command:
- cmd: >
- auto-apt-proxy debootstrap
- --include={{ cont_packages | union(cont_packages_extra) | join(',') }}
- --components=main,contrib,non-free stable
- {{ contname }}00 http://deb.debian.org/debian
- args:
- chdir: /var/lib/machines/
- creates: /var/lib/machines/{{ contname }}00
- notify: enable and restart containers
-
-- name: provide complete apt sources
- copy:
- src: /etc/apt/sources.list
- dest: /var/lib/machines/{{ contname }}00/etc/apt/sources.list
- mode: 0644
- remote_src: true
-
-- name: configure locale
- lineinfile:
- path: /var/lib/machines/{{ contname }}00/etc/profile
- line: 'export LANG=C'
-
-## Use 'chroot' here instead of 'systemd-nspawn -D …' to make it work
-## with ansible-pull in the preseed debian installer:
-- name: upgrade container
- command:
- cmd: "{{ item }}"
- args:
- chdir: /var/lib/machines/{{ contname }}00
- loop:
- - mount --bind /proc proc
- - mount --bind /sys sys
- - mount --bind /dev/pts dev/pts
- - chroot . sh -c '/usr/bin/apt-get update && DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get full-upgrade --yes'
- - umount proc sys dev/pts
- register: cmd_result
- changed_when: cmd_result.stdout is not search('0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.')
-
-- name: provide {{ contuser }} user account
- command:
- cmd: >
- chroot . sh -c '/usr/sbin/useradd -m -s /bin/bash
- -c "User {{ contuser }},,," -G sudo {{ contuser }}'
- args:
- chdir: /var/lib/machines/{{ contname }}00
- creates: /var/lib/machines/{{ contname }}00/home/{{ contuser }}
- register: user_account
-
-- name: provide empty password for {{ contuser }} user
- command:
- cmd: chroot . sh -c "passwd -d {{ contuser }}"
- args:
- chdir: /var/lib/machines/{{ contname }}00
- when: user_account.changed | default(false) and contpwd | length == 0
-
-- name: provide password for container {{ contuser }} user
- command:
- cmd: chroot . sh -c "echo {{ contuser }}:{{ contpwd }} | chpasswd"
- args:
- chdir: /var/lib/machines/{{ contname }}00
- when: user_account.changed | default(true) and contpwd | length > 0
-
-- name: allow empty passwords in ssh
- lineinfile:
- path: /var/lib/machines/{{ contname }}00/etc/ssh/sshd_config
- insertafter: '#PermitEmptyPasswords no'
- line: 'PermitEmptyPasswords yes'
- when: user_account.changed | default(false) and contpwd | length == 0
-
-- name: prepare directories
- file:
- path: /var/lib/machines/{{ contname }}00/etc/systemd/system/{{ item }}
- state: directory
- mode: 0755
- loop:
- - multi-user.target.wants
- - sockets.target.wants
- - network-online.target.wants
- notify: enable and restart containers
-
-- name: enable systemd-networkd service
- file:
- src: /lib/systemd/system/{{ item.src }}
- dest: /var/lib/machines/{{ contname }}00/etc/systemd/system/{{ item.dest }}
- state: link
- follow: false
- force: true
- loop:
- - src: systemd-networkd.service
- dest: dbus-org.freedesktop.network1.service
- - src: systemd-networkd.service
- dest: multi-user.target.wants/systemd-networkd.service
- - src: systemd-networkd.socket
- dest: sockets.target.wants/systemd-networkd.socket
- - src: systemd-networkd-wait-online.service
- dest: network-online.target.wants/systemd-networkd-wait-online.service
- notify: enable and restart containers
-
-- name: enable systemd-resolved in containers
- file:
- src: /lib/systemd/system/{{ item.src }}
- dest: /var/lib/machines/{{ contname }}00/etc/systemd/system/{{ item.dest }}
- state: link
- follow: false
- force: true
- loop:
- - src: systemd-resolved.service
- dest: dbus-org.freedesktop.resolve1.service
- - src: systemd-resolved.service
- dest: multi-user.target.wants/systemd-resolved.service
- notify: enable and restart containers
-
-########
-- name: prepare local sysctl config file
- copy:
- content: "# Avoid 'too many open files' error:"
- dest: /etc/sysctl.d/inotify.conf
- mode: 0644
- force: false
-
-- name: fix too many open files error
- sysctl:
- name: fs.inotify.max_user_instances
- value: '1024'
- sysctl_file: /etc/sysctl.d/inotify.conf
-
-- name: generate links to the initial container
- file:
- src: "{{ contname }}00"
- dest: /var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}
- state: link
- loop: "{{ containers[1:] }}"
- notify: enable and restart containers
-
-- name: prepare nspawn config directory
- file:
- path: /etc/systemd/nspawn
- state: directory
- mode: 0755
-
-- name: provide container configuration
- template:
- src: contcfg.nspawn.j2
- dest: /etc/systemd/nspawn/{{ contname }}{{ "%02d" | format(item|int) }}.nspawn
- mode: 0644
- loop: "{{ containers }}"
- notify: enable and restart containers
-
-- name: provide container hostname file
- template:
- src: hostname.j2
- dest: /var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}.hostname
- mode: 0644
- loop: "{{ containers }}"
- notify: enable and restart containers
-
-- name: provide container hosts file
- template:
- src: hosts.j2
- dest: /var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}.hosts
- mode: 0644
- loop: "{{ containers }}"
- notify: enable and restart containers
diff --git a/roles/educontainer/templates/contcfg.nspawn.j2 b/roles/educontainer/templates/contcfg.nspawn.j2
deleted file mode 100644
index 9f8b5ea..0000000
--- a/roles/educontainer/templates/contcfg.nspawn.j2
+++ /dev/null
@@ -1,15 +0,0 @@
-[Exec]
-Capability=CAP_NET_ADMIN
-ResolvConf=copy-host
-
-[Network]
-Port=10{{ "%03d" | format(item|int) }}:22
-Port=10{{ "%03d" | format(item|int + 100) }}:80
-Port=10{{ "%03d" | format(item|int + 200) }}:443
-
-[Files]
-ReadOnly=yes
-Overlay=+/:/var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}-delta:/
-PrivateUsersChown=false
-BindReadOnly=/var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}.hostname:/etc/hostname
-BindReadOnly=/var/lib/machines/{{ contname }}{{ "%02d" | format(item|int) }}.hosts:/etc/hosts
diff --git a/roles/educontainer/templates/hostname.j2 b/roles/educontainer/templates/hostname.j2
deleted file mode 100644
index 3c3ac55..0000000
--- a/roles/educontainer/templates/hostname.j2
+++ /dev/null
@@ -1 +0,0 @@
-{{ contname }}{{ "%02d" | format(item|int) }}
diff --git a/roles/educontainer/templates/hosts.j2 b/roles/educontainer/templates/hosts.j2
deleted file mode 100644
index 9767fea..0000000
--- a/roles/educontainer/templates/hosts.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-127.0.0.1 localhost {{ contname }}{{ "%02d" | format(item|int) }}
-::1 localhost {{ contname }}{{ "%02d" | format(item|int) }} ip6-localhost ip6-loopback
-ff02::1 ip6-allnodes
-ff02::2 ip6-allrouters
diff --git a/roles/edulive/defaults/main.yml b/roles/edulive/defaults/main.yml
deleted file mode 100644
index 5834054..0000000
--- a/roles/edulive/defaults/main.yml
+++ /dev/null
@@ -1 +0,0 @@
-build_dir: /opt/live-build/
diff --git a/roles/edulive/files/gnome-edu/README b/roles/edulive/files/gnome-edu/README
deleted file mode 100644
index 83e60e3..0000000
--- a/roles/edulive/files/gnome-edu/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This config space is based on:
- https://salsa.debian.org/live-team/live-images/-/tree/debian/images/gnome-desktop
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/auto/build b/roles/edulive/files/gnome-edu/auto/build
deleted file mode 100755
index f8d8346..0000000
--- a/roles/edulive/files/gnome-edu/auto/build
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-set -e
-
-lb build noauto "${@}" 2>&1 | tee build.log
diff --git a/roles/edulive/files/gnome-edu/auto/clean b/roles/edulive/files/gnome-edu/auto/clean
deleted file mode 100755
index 4b8ccaa..0000000
--- a/roles/edulive/files/gnome-edu/auto/clean
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -e
-
-lb clean noauto "${@}"
-
-rm -f config/binary config/bootstrap config/chroot config/common config/source
-rm -f config/control
-
-rm -f build.log
diff --git a/roles/edulive/files/gnome-edu/auto/config b/roles/edulive/files/gnome-edu/auto/config
deleted file mode 100755
index 96e38d3..0000000
--- a/roles/edulive/files/gnome-edu/auto/config
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-set -e
-
-lb config noauto \
- --clean \
- --cache false \
- --net-tarball false \
- --ignore-system-defaults \
- --distribution bullseye \
- --binary-images netboot \
- --mode debian \
- --backports true \
- --linux-packages linux-image \
- --archive-areas "main contrib non-free" \
- --mirror-bootstrap http://localhost:3142/deb.debian.org/debian/ \
- --mirror-chroot-security http://localhost:3142/security.debian.org/debian-security/ \
-"${@}"
diff --git a/roles/edulive/files/gnome-edu/config/hooks/0001-plymouth-theme.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/0001-plymouth-theme.hook.chroot
deleted file mode 100755
index 16095e0..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/0001-plymouth-theme.hook.chroot
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ -e /usr/sbin/plymouth-set-default-theme ] && [ -e /usr/share/plymouth/themes/lines ]
-then
- plymouth-set-default-theme lines
-fi
diff --git a/roles/edulive/files/gnome-edu/config/hooks/live/0010-disable-kexec-tools.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/live/0010-disable-kexec-tools.hook.chroot
deleted file mode 120000
index 996f766..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/live/0010-disable-kexec-tools.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/live/0010-disable-kexec-tools.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot
deleted file mode 120000
index 5ddf090..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/live/0500-desktop.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/live/0500-desktop.hook.chroot
deleted file mode 100755
index a051368..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/live/0500-desktop.hook.chroot
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-set -e
-
-echo 'pref("browser.startup.homepage", "https://www.startpage.com");' >> /etc/firefox-esr/firefox-esr.js
-echo 'pref("network.proxy.type", 4);' >> /etc/firefox-esr/firefox-esr.js
-
-dconf update
-
-#sed -i "s/^/#/" /etc/xdg/user-dirs.defaults
-
-sed -i "s/^#WaylandEnable=false$/WaylandEnable=false/" /etc/gdm3/daemon.conf
-
-## workaround https://bugzilla.gnome.org/show_bug.cgi?id=730587
-#dpkg-divert --divert /usr/bin/gnome-keyring-daemon.bak --rename /usr/bin/gnome-keyring-daemon
diff --git a/roles/edulive/files/gnome-edu/config/hooks/live/0600-wireshark.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/live/0600-wireshark.hook.chroot
deleted file mode 100755
index 13ce126..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/live/0600-wireshark.hook.chroot
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-set -e
-
-## allow everybody to run wireshark:
-chmod 0755 /usr/bin/dumpcap
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0020-create-mtab-symlink.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0020-create-mtab-symlink.hook.chroot
deleted file mode 120000
index 58123fc..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0020-create-mtab-symlink.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0020-create-mtab-symlink.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0030-enable-cryptsetup.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0030-enable-cryptsetup.hook.chroot
deleted file mode 120000
index c5ab625..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0030-enable-cryptsetup.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0030-enable-cryptsetup.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0040-create-locales-files.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0040-create-locales-files.hook.chroot
deleted file mode 120000
index 036e7e0..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0040-create-locales-files.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0040-create-locales-files.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot
deleted file mode 120000
index b0ccdb6..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0100-remove-adjtime-configuration.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0110-remove-backup-files.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0110-remove-backup-files.hook.chroot
deleted file mode 120000
index 8b68c5c..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0110-remove-backup-files.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0110-remove-backup-files.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot
deleted file mode 120000
index 4d55b27..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0120-remove-dbus-machine-id.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot
deleted file mode 120000
index 54f6a9b..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0140-remove-log-files.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0140-remove-log-files.hook.chroot
deleted file mode 120000
index 2b99cec..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0140-remove-log-files.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0140-remove-log-files.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot
deleted file mode 120000
index 0c3cd2f..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0150-remove-mdadm-configuration.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot
deleted file mode 120000
index e57b8d2..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0170-remove-python-py.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0170-remove-python-py.hook.chroot
deleted file mode 120000
index 858a942..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0170-remove-python-py.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0170-remove-python-py.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot
deleted file mode 120000
index 6cecf66..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0180-remove-systemd-machine-id.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0190-remove-temporary-files.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0190-remove-temporary-files.hook.chroot
deleted file mode 120000
index ada76d9..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0190-remove-temporary-files.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0190-remove-temporary-files.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot
deleted file mode 120000
index 9fc0723..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot
deleted file mode 120000
index f893dcc..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot
deleted file mode 120000
index a6ee33d..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0400-update-apt-file-cache.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0400-update-apt-file-cache.hook.chroot
deleted file mode 120000
index 380fdcf..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0400-update-apt-file-cache.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0400-update-apt-file-cache.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot
deleted file mode 120000
index dd7150e..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0410-update-apt-xapian-index.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0420-update-glx-alternative.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0420-update-glx-alternative.hook.chroot
deleted file mode 120000
index 4da25f8..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0420-update-glx-alternative.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0420-update-glx-alternative.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0430-update-mlocate-database.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0430-update-mlocate-database.hook.chroot
deleted file mode 120000
index 13b49d7..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0430-update-mlocate-database.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0430-update-mlocate-database.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot
deleted file mode 120000
index 0a65196..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0440-update-nvidia-alternative.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/hooks/normal/0500-reproducible-glibc.hook.chroot b/roles/edulive/files/gnome-edu/config/hooks/normal/0500-reproducible-glibc.hook.chroot
deleted file mode 120000
index 9d4f095..0000000
--- a/roles/edulive/files/gnome-edu/config/hooks/normal/0500-reproducible-glibc.hook.chroot
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/live/build/hooks/normal/0500-reproducible-glibc.hook.chroot
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/db/gdm.d/00-login-screen b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/db/gdm.d/00-login-screen
deleted file mode 100644
index 23408bc..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/db/gdm.d/00-login-screen
+++ /dev/null
@@ -1,8 +0,0 @@
-[org/gnome/login-screen]
-disable-user-list=true
-logo='/usr/share/desktop-base/debian-logos/logo-text-64.png'
-
-[org/gnome/settings-daemon/plugins/power]
-power-button-action='interactive'
-sleep-inactive-ac-timeout=600
-sleep-inactive-ac-type='interactive'
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/db/local.d/defaults b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/db/local.d/defaults
deleted file mode 100644
index ffde793..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/db/local.d/defaults
+++ /dev/null
@@ -1,34 +0,0 @@
-[org/gnome/shell]
-enabled-extensions=['apps-menu@gnome-shell-extensions.gcampax.github.com', 'window-list@gnome-shell-extensions.gcampax.github.com', 'places-menu@gnome-shell-extensions.gcampax.github.com', 'drive-menu@gnome-shell-extensions.gcampax.github.com', 'dash-to-dock@micxgx.gmail.com']
-
-[org/gnome/desktop/input-sources]
-sources=[('xkb', 'de'), ('xkb', 'us')]
-
-[org/gnome/desktop/wm/preferences]
-button-layout='appmenu:minimize,maximize,close'
-
-[org/gnome/desktop/peripherals/touchpad]
-natural-scroll=false
-edge-scrolling-enabled=true
-tap-to-click=true
-
-[org/gnome/nautilus/preferences]
-default-folder-viewer='list-view'
-
-[org/gnome/nautilus/list-view]
-use-tree-view=true
-
-[org/gnome/settings-daemon/plugins/power]
-power-button-action='interactive'
-sleep-inactive-battery-timeout=600
-sleep-inactive-battery-type='hibernate'
-sleep-inactive-ac-timeout=6000
-sleep-inactive-ac-type='nothing'
-
-[org/gnome/desktop/screensaver]
-lock-enabled=false
-
-[org/gnome/desktop/interface]
-clock-show-date=true
-clock-show-seconds=true
-clock-show-weekday=true
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/profile/gdm b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/profile/gdm
deleted file mode 100644
index c165d75..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/profile/gdm
+++ /dev/null
@@ -1,3 +0,0 @@
-user-db:user
-system-db:gdm
-file-db:/usr/share/gdm/greeter.dconf-defaults
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/profile/user b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/profile/user
deleted file mode 100644
index aca0641..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/dconf/profile/user
+++ /dev/null
@@ -1,2 +0,0 @@
-user-db:user
-system-db:local
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/netboot.xml b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/netboot.xml
deleted file mode 100644
index 6a993f9..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/netboot.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
- netboot
- 60ea84db-de6c-493c-8e3f-8e9a99ee19c2
-
-
-
-
-
- 2097152
- 2097152
- 2
-
- hvm
- /usr/share/OVMF/OVMF_CODE.fd
- /var/lib/libvirt/qemu/nvram/netboot_VARS.fd
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- destroy
- restart
- destroy
-
-
-
-
-
- /usr/bin/qemu-system-x86_64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /dev/urandom
-
-
-
-
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/autostart/default.xml b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/autostart/default.xml
deleted file mode 120000
index 8339868..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/autostart/default.xml
+++ /dev/null
@@ -1 +0,0 @@
-../default.xml
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/autostart/intern.xml b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/autostart/intern.xml
deleted file mode 120000
index 08b61d4..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/autostart/intern.xml
+++ /dev/null
@@ -1 +0,0 @@
-../intern.xml
\ No newline at end of file
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/intern.xml b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/intern.xml
deleted file mode 100644
index a0e5425..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/libvirt/qemu/networks/intern.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- intern
- 399d67ae-263b-4aeb-995d-fe0a44f00132
-
-
-
-
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/sysctl.d/sysctl.conf b/roles/edulive/files/gnome-edu/config/includes.chroot/etc/sysctl.d/sysctl.conf
deleted file mode 100644
index c038e6d..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/etc/sysctl.d/sysctl.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Uncomment the following to stop low-level messages on console
-kernel.printk = 3 4 1 3
-
diff --git a/roles/edulive/files/gnome-edu/config/includes.chroot/lib/live/config/0001-VM-MAC b/roles/edulive/files/gnome-edu/config/includes.chroot/lib/live/config/0001-VM-MAC
deleted file mode 100755
index 784d836..0000000
--- a/roles/edulive/files/gnome-edu/config/includes.chroot/lib/live/config/0001-VM-MAC
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# Fix deployed VM config
-
-set -eu
-
-NIC="$(ip link | grep "^2: " | cut -d ' ' -f2 | sed "s/://")"
-MAC="$(ip link | grep -A1 "^2: " | grep -oE "[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2} " \
- | sed "s/ //g")"
-
-sed -i -e "s/VMMAC/$MAC/g" -e "s/INTERFACE/$NIC/g" /etc/libvirt/qemu/netboot.xml
-
diff --git a/roles/edulive/files/gnome-edu/config/package-lists/desktop.list.chroot b/roles/edulive/files/gnome-edu/config/package-lists/desktop.list.chroot
deleted file mode 100644
index 86881fe..0000000
--- a/roles/edulive/files/gnome-edu/config/package-lists/desktop.list.chroot
+++ /dev/null
@@ -1,13 +0,0 @@
-task-gnome-desktop
-
-gnome-shell-extension-dashtodock
-gnome-shell-extension-dash-to-panel
-
-plymouth
-plymouth-x11
-
-gstreamer1.0-vaapi
-i965-va-driver
-
-## this confuses apt-cacher-ng:
-#auto-apt-proxy
diff --git a/roles/edulive/files/gnome-edu/config/package-lists/live-systems.list.chroot b/roles/edulive/files/gnome-edu/config/package-lists/live-systems.list.chroot
deleted file mode 100644
index d73ed96..0000000
--- a/roles/edulive/files/gnome-edu/config/package-lists/live-systems.list.chroot
+++ /dev/null
@@ -1,2 +0,0 @@
-live-manual
-live-tools
diff --git a/roles/edulive/files/gnome-edu/config/package-lists/live.list.chroot b/roles/edulive/files/gnome-edu/config/package-lists/live.list.chroot
deleted file mode 100644
index 1e6ef96..0000000
--- a/roles/edulive/files/gnome-edu/config/package-lists/live.list.chroot
+++ /dev/null
@@ -1,3 +0,0 @@
-live-boot
-live-config
-live-config-systemd
diff --git a/roles/edulive/files/gnome-edu/config/package-lists/localization.list.chroot b/roles/edulive/files/gnome-edu/config/package-lists/localization.list.chroot
deleted file mode 100644
index f952ab0..0000000
--- a/roles/edulive/files/gnome-edu/config/package-lists/localization.list.chroot
+++ /dev/null
@@ -1,2 +0,0 @@
-task-english
-task-german
diff --git a/roles/edulive/files/gnome-edu/config/package-lists/school.list.chroot b/roles/edulive/files/gnome-edu/config/package-lists/school.list.chroot
deleted file mode 100644
index 2c90ba9..0000000
--- a/roles/edulive/files/gnome-edu/config/package-lists/school.list.chroot
+++ /dev/null
@@ -1,100 +0,0 @@
-#
-# This file is linked to all desktop configurations.
-# Put desktop specific packages in the desktop specific file.
-#
-#webext-ublock-origin-firefox
-#webext-ublock-origin-chromium
-webext-ublock-origin
-webext-privacy-badger
-
-vim
-emacs
-vlc
-gimp
-inkscape
-bluefish
-
-openboard
-xournal
-
-freecad
-librecad
-kicad
-
-git
-mc
-tmux
-wireshark
-nmap
-netcat-openbsd
-net-tools
-thonny
-spyder
-ghex
-
-codeblocks
-gprolog
-qtcreator
-obs-studio
-
-mu-editor
-dia
-vym
-shellcheck
-xterm
-
-tree
-console-setup
-virt-manager
-sway
-
-task-german-desktop
-
-ssh-askpass-gnome
-keepassxc
-
-#nextcloud-desktop
-#nautilus-nextcloud
-#thunderbird
-#thunderbird-l10n-de
-
-#texlive
-#texlive-latex-extra
-#texlive-lang-german
-#texlive-science
-
-pdf-presenter-console
-
-libreoffice/bullseye-backports
-libreoffice-core/bullseye-backports
-libreoffice-common/bullseye-backports
-libreoffice-writer/bullseye-backports
-libreoffice-calc/bullseye-backports
-libreoffice-impress/bullseye-backports
-libreoffice-base/bullseye-backports
-libreoffice-base-drivers/bullseye-backports
-libreoffice-math/bullseye-backports
-libreoffice-report-builder-bin/bullseye-backports
-libreoffice-style-colibre/bullseye-backports
-libreoffice-gnome/bullseye-backports
-libreoffice-gtk3/bullseye-backports
-libreoffice-style-elementary/bullseye-backports
-libreoffice-help-common/bullseye-backports
-libreoffice-help-de/bullseye-backports
-libreoffice-java-common/bullseye-backports
-libreoffice-l10n-de/bullseye-backports
-libreoffice-nlpsolver/bullseye-backports
-libreoffice-report-builder/bullseye-backports
-libreoffice-script-provider-bsh/bullseye-backports
-libreoffice-script-provider-js/bullseye-backports
-libreoffice-script-provider-python/bullseye-backports
-libreoffice-sdbc-firebird/bullseye-backports
-libreoffice-sdbc-hsqldb/bullseye-backports
-libreoffice-sdbc-mysql/bullseye-backports
-libreoffice-sdbc-postgresql/bullseye-backports
-libreoffice-wiki-publisher/bullseye-backports
-
-python3-uno/bullseye-backports
-libuno-sal3/bullseye-backports
-fonts-opensymbol/bullseye-backports
-ure/bullseye-backports
diff --git a/roles/edulive/files/gnome-edu/config/package-lists/standard.list.chroot b/roles/edulive/files/gnome-edu/config/package-lists/standard.list.chroot
deleted file mode 100644
index 094fbcf..0000000
--- a/roles/edulive/files/gnome-edu/config/package-lists/standard.list.chroot
+++ /dev/null
@@ -1,4 +0,0 @@
-! Packages Priority standard
-
-task-laptop
-task-ssh-server
diff --git a/roles/edulive/files/gnome-edu/config/preseed/wireshark.cfg.chroot b/roles/edulive/files/gnome-edu/config/preseed/wireshark.cfg.chroot
deleted file mode 100644
index f885636..0000000
--- a/roles/edulive/files/gnome-edu/config/preseed/wireshark.cfg.chroot
+++ /dev/null
@@ -1 +0,0 @@
-wireshark-common wireshark-common/install-setuid boolean true
diff --git a/roles/edulive/files/livebuilder.service b/roles/edulive/files/livebuilder.service
deleted file mode 100644
index ccb12d2..0000000
--- a/roles/edulive/files/livebuilder.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Run livebuilder script
-
-[Service]
-Type=simple
-ExecStart=/usr/local/sbin/livebuilder.sh
diff --git a/roles/edulive/files/livebuilder.timer b/roles/edulive/files/livebuilder.timer
deleted file mode 100644
index 3051305..0000000
--- a/roles/edulive/files/livebuilder.timer
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Run livebuilder script weekly
-
-[Timer]
-OnCalendar=weekly
-Persistent=true
-AccuracySec=3h
-RandomizedDelaySec=3h
-
-[Install]
-WantedBy=timers.target
diff --git a/roles/edulive/handlers/main.yml b/roles/edulive/handlers/main.yml
deleted file mode 100644
index 30aee83..0000000
--- a/roles/edulive/handlers/main.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- name: run the image build script
- command:
- cmd: livebuilder.sh
- listen: run build script
-
-- name: enable timer for livebuilder
- systemd:
- name: livebuilder.timer
- state: started
- enabled: true
- listen: enable livebuilder.timer
diff --git a/roles/edulive/tasks/main.yml b/roles/edulive/tasks/main.yml
deleted file mode 100644
index 4ffb7c8..0000000
--- a/roles/edulive/tasks/main.yml
+++ /dev/null
@@ -1,75 +0,0 @@
----
-- name: install packages
- apt:
- name:
- - live-build
- state: latest # noqa package-latest
-
-- name: prepare live-build directory
- file:
- path: "{{ build_dir }}"
- state: directory
- mode: 0755
-
-- name: copy build script
- template:
- src: livebuilder.sh
- dest: /usr/local/sbin/
- mode: 0755
-
-- name: provide service and timer for livebuilder
- copy:
- src: "{{ item }}"
- dest: "/etc/systemd/system/{{ item }}"
- mode: 0644
- with_items:
- - livebuilder.service
- - livebuilder.timer
- notify: "enable livebuilder.timer"
-
-- name: copy live-build configuration
- copy:
- src: "{{ item }}"
- dest: "{{ build_dir }}"
- local_follow: false
- mode: preserve
- loop: "{{ build_images }}"
-
-- name: prepare debian live nfs boot entry title
- lineinfile:
- path: /etc/di-netboot-assistant/ipxemenu.HEAD
- insertafter: '-- Customized Boot Entries --'
- line: "item {{ item }} Debian GNU/Linux {{ item }} NFS"
- loop:
- "{{ build_images }}"
- notify: rebuild di-netboot menu
-
-- name: prepare debian live boot loader ipxe
- blockinfile:
- path: /etc/di-netboot-assistant/ipxemenu.HEAD
- marker: "# {mark} ANSIBLE MANAGED BLOCK {{ item }}"
- block: |
- :{{ item }}
- echo Booting Debian GNU/Linux EDU LIVE NFS
- kernel ${210:string}d-i/n-live/{{ item }}/live/vmlinuz \
- initrd=initrd.img {{ boot_params|join(' ') }} \
- nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/{{ item }}/
- initrd ${210:string}d-i/n-live/{{ item }}/live/initrd.img
- boot
- loop: "{{ build_images }}"
- notify: rebuild di-netboot menu
-
-- name: prepare debian live boot loader grub
- blockinfile:
- path: /etc/di-netboot-assistant/grub.cfg.HEAD
- insertbefore: "^menuentry 'Boot from local disk..'"
- marker: "# {mark} ANSIBLE MANAGED BLOCK {{ item }}"
- block: |
- menuentry 'Debian GNU/Linux Live {{ item }} NFS' {
- linux (http,{{ ansible_default_ipv4.address }})/d-i/n-live/{{ item }}/live/vmlinuz \
- {{ boot_params|join(' ') }} \
- nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/{{ item }}/
- initrd (http,{{ ansible_default_ipv4.address }})/d-i/n-live/{{ item }}/live/initrd.img
- }
- loop: "{{ build_images }}"
- notify: rebuild di-netboot menu
diff --git a/roles/edulive/templates/livebuilder.sh b/roles/edulive/templates/livebuilder.sh
deleted file mode 100644
index 92f7aab..0000000
--- a/roles/edulive/templates/livebuilder.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/bash
-#
-# build live images and copy kernel, initramfs and squashfs
-#
-
-set -eu
-
-BUILDD="{{ build_dir }}"
-
-run_build(){
- local DEST="/var/lib/tftpboot/d-i/n-live/$1/live/"
- cd "$BUILDD/$1"
- [[ -d "$DEST" ]] || mkdir -vp "$DEST"
-
- lb clean && lb config && lb build
-
- for FILE in vmlinuz initrd.img filesystem.squashfs ; do
- ln -vf "$BUILDD/$1/binary/live/$FILE" "$DEST"
- done
-}
-
-## main:
-
-if ! auto-apt-proxy | grep -q 'http://127.0.0.1:3142' ; then
- echo "Cannot find the local apt proxy needed to build live images."
- exit 1
-fi
-
-for IMG in {{ build_images|join(' ') }} ; do
- echo "=========== Building image $IMG ==========="
- run_build $IMG
-done
diff --git a/roles/exam_homes/files/archive-homes b/roles/exam_homes/files/archive-homes
deleted file mode 100755
index b5932dc..0000000
--- a/roles/exam_homes/files/archive-homes
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/bash
-#
-# Backup and remove all student home directories.
-
-set -eu
-
-HDIRS='/home/'
-DIRS=()
-
-for DIR in $(find $HDIRS -maxdepth 1 -mindepth 1 -type d) ; do
- H="$(basename $DIR)"
- if [[ "$H" =~ ^L_ ]] || [[ "$H" =~ ansible ]] ; then
- echo "Skipping home of '$H'."
- continue
- fi
- DIRS+=("$DIR")
-done
-[[ "${#DIRS[@]}" -eq 0 ]] && exit 0
-
-tar czf "/var/backups/homes_$(date -I).tar.gz" -C "$HDIRS" \
- -P --transform="s%$HDIRS%%" "${DIRS[@]}"
-rm -rf "${DIRS[@]}"
-echo "Archived and removed: ${DIRS[@]}"
diff --git a/roles/exam_homes/files/archive-homes.service b/roles/exam_homes/files/archive-homes.service
deleted file mode 100644
index 311a449..0000000
--- a/roles/exam_homes/files/archive-homes.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Archive students' home directories
-
-[Service]
-Type=simple
-ExecStart=/usr/local/sbin/archive-homes
diff --git a/roles/exam_homes/files/archive-homes.timer b/roles/exam_homes/files/archive-homes.timer
deleted file mode 100644
index 829e8f0..0000000
--- a/roles/exam_homes/files/archive-homes.timer
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Run archive script every night
-
-[Timer]
-OnCalendar=daily
-Persistent=true
-AccuracySec=3h
-RandomizedDelaySec=3h
-
-[Install]
-WantedBy=timers.target
diff --git a/roles/exam_homes/files/copy2students b/roles/exam_homes/files/copy2students
deleted file mode 100755
index ad501c8..0000000
--- a/roles/exam_homes/files/copy2students
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/bash
-#
-# Copy content to all student home download directories.
-
-set -eu
-if [[ -z $@ ]] ; then
- echo "Argument missing!"
- exit 1
-fi
-
-HDIRS='/home/'
-DIRS=()
-
-for DIR in $(find $HDIRS -maxdepth 1 -mindepth 1 -type d) ; do
- H="$(basename $DIR)"
- if [[ "$H" =~ ^L_ ]] || [[ "$H" =~ ansible ]] ; then
- echo "Skipping home of '$H'."
- continue
- fi
- DIRS+=("$DIR")
-done
-[[ "${#DIRS[@]}" -eq 0 ]] && exit 0
-
-for DIR in "${DIRS[@]}" ; do
- cp -va $@ "$DIR/Downloads/"
-done
diff --git a/roles/exam_homes/files/examode.py b/roles/exam_homes/files/examode.py
deleted file mode 100755
index 459ef35..0000000
--- a/roles/exam_homes/files/examode.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/python3
-
-import ldap
-from os import scandir
-
-HOME = '/home'
-BASE = 'ou=schueler,ou=Benutzer,ou=fvs,ou=SCHULEN,o=ml3'
-#BASE = 'ou=Benutzer,ou=fvs,ou=SCHULEN,o=ml3'
-LDAP = 'ldap://ldap.steinbeisschule-reutlingen.de'
-
-def fetch_ou(uid):
- l = ldap.initialize(LDAP)
- f = '(uid=' + uid + ')'
- try:
- return l.search_s(BASE,ldap.SCOPE_SUBTREE,f,['ou'])[0][1]['ou'][0].decode('utf-8')
- except:
- return None
-
-def fetch_uids(crs):
- uids = []
- l = ldap.initialize(LDAP)
- # if 'Abgang' in crs:
- # b = 'ou=Abgang,' + BASE
- # else:
- # b = 'ou=' + crs + ',' + BASE
- b = BASE
- r = l.search_s(b,ldap.SCOPE_SUBTREE,'(ou=' + crs + ')',['uid'])
- for dn,entry in r:
- if entry != {}:
- uids.append(entry['uid'][0].decode('utf-8'))
- return uids
-
-def assign_course(user, crs_uids, home):
- c = fetch_ou(user)
- print('Needed to fetch new course', c, 'for', user)
- if c:
- crs_uids[c] = fetch_uids(c)
- home[user] = c
- else:
- print('No course for', user , 'found!')
-
-
-if __name__ == '__main__':
- home = {}
- with scandir(HOME) as it:
- for entry in it:
- if entry.is_dir() and entry.name != 'lost+found':
- home[entry.name] = ''
-
- crs_uids = {}
- for user in home:
- if crs_uids == {}:
- assign_course(user, crs_uids, home)
- continue
- for k in crs_uids.keys():
- if user in crs_uids[k]:
- home[user] = k
- break
- else:
- assign_course(user, crs_uids, home)
-
- for usr in home:
- print(usr, home[usr])
-
-
- for crs in crs_uids.keys():
- print(usr, home[usr])
-
- for k, v in sorted(crs_uids.items()):
- print(k, sorted(v))
- for item in sorted(v):
- try:
- print(item, home[item])
- except:
- print('No home for', item, 'found.')
diff --git a/roles/exam_homes/files/fetchexam b/roles/exam_homes/files/fetchexam
deleted file mode 100755
index c28d0fc..0000000
--- a/roles/exam_homes/files/fetchexam
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/bash
-#
-# Backup and remove all student home directories.
-
-set -eu
-
-HDIRS='/home/'
-DIRS=()
-
-for DIR in $(find $HDIRS -maxdepth 1 -mindepth 1 -type d) ; do
- H="$(basename $DIR)"
- if [[ "$H" =~ ^L_ ]] || [[ "$H" =~ ansible ]] ; then
- echo "Skipping home of '$H'."
- continue
- fi
- DIRS+=("$DIR")
-done
-[[ "${#DIRS[@]}" -eq 0 ]] && exit 0
-
-AR="homes_$(date -I).tar.gz"
-tar czf "$AR" -C "$HDIRS" --exclude='.[^/]*' \
- -P --transform="s%$HDIRS%%" "${DIRS[@]}"
-echo "Create archive $AR containing: ${DIRS[@]}"
diff --git a/roles/exam_homes/files/mkDownloads b/roles/exam_homes/files/mkDownloads
deleted file mode 100755
index 556d376..0000000
--- a/roles/exam_homes/files/mkDownloads
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/bash
-#
-# Prepare Downloads directory.
-
-set -eu
-
-HDIRS='/home/'
-
-if [[ ! -d "$HDIRS/$PAM_USER/Downloads" ]] && [[ ! "$PAM_USER" =~ ^L_ ]] && \
- [[ ! "$PAM_USER" =~ ansible ]] ; then
- mkdir --mode=0777 "$HDIRS/$PAM_USER/Downloads"
-fi
diff --git a/roles/exam_homes/handlers/main.yml b/roles/exam_homes/handlers/main.yml
deleted file mode 100644
index 7db5f01..0000000
--- a/roles/exam_homes/handlers/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-- name: enable archive-homes.timer
- systemd:
- name: archive-homes.timer
- state: started
- enabled: true
- listen: enable archive-homes.timer
diff --git a/roles/exam_homes/tasks/main.yml b/roles/exam_homes/tasks/main.yml
deleted file mode 100644
index 784b0f8..0000000
--- a/roles/exam_homes/tasks/main.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-- name: enable pam_mkhomedir.so and pam_exec.so
- lineinfile:
- dest: /etc/pam.d/common-session
- line: "{{ item }}"
- insertbefore: "# end of pam-auth-update config"
- loop:
- - "session optional pam_mkhomedir.so umask=0022"
- - "session optional pam_exec.so /usr/local/sbin/mkDownloads"
-
-- name: deploy mkDownloads script
- copy:
- src: mkDownloads
- dest: /usr/local/sbin/mkDownloads
- mode: 0755
-
-# https://serverfault.com/questions/354615/allow-sftp-but-disallow-ssh
-- name: only allow sftp for most users
- blockinfile:
- dest: /etc/ssh/sshd_config.d/local.conf
- create: true
- block: |
- Match User !L_*,!ansible,*
- PermitTTY no
- X11Forwarding no
- AllowTcpForwarding no
- AllowAgentForwarding no
- ForceCommand internal-sftp
-
-- name: deploy archive home script
- copy:
- src: archive-homes
- dest: /usr/local/sbin/archive-homes
- mode: 0750
-
-- name: deploy archive home script service and timer
- copy:
- src: "{{ item }}"
- dest: /etc/systemd/system/{{ item }}
- mode: 0655
- loop:
- - archive-homes.service
- - archive-homes.timer
- notify: enable archive-homes.timer
-
-- name: deploy examode helper
- copy:
- src: examode.py
- dest: /usr/local/bin/examode.py
- mode: 0755
-
-- name: deploy exam scripts
- copy:
- src: "{{ item }}"
- dest: "/usr/local/bin/{{ item }}"
- mode: 0755
- loop:
- - copy2students
- - fetchexam
diff --git a/roles/firewalld2if/handlers/main.yml b/roles/firewalld2if/handlers/main.yml
deleted file mode 100644
index 81201d4..0000000
--- a/roles/firewalld2if/handlers/main.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-- name: restart networking
- command: ifup {{ if_lan }}
- listen: "bring up LAN interface"
- when: not run_in_installer|default(false)|bool
-
-- name: start firewalld
- systemd: name=firewalld state=started enabled=yes
- listen: "start firewalld"
- when: not run_in_installer|default(false)|bool
diff --git a/roles/firewalld2if/tasks/main.yml b/roles/firewalld2if/tasks/main.yml
deleted file mode 100644
index 3147677..0000000
--- a/roles/firewalld2if/tasks/main.yml
+++ /dev/null
@@ -1,80 +0,0 @@
-- name: add if_lan with static address
- template:
- src: interfaces-static.j2
- dest: /etc/network/interfaces.d/static
- mode: 0644
- notify: "bring up LAN interface"
-
-- name: install firewalld package
- apt: name=firewalld state=latest # noqa package-latest
- notify: "start firewalld"
-
-- name: flush all handlers
- meta: flush_handlers
-
-
-## Do not run the following in the installer:
-
-- name: add WAN interface to zone public
- firewalld:
- zone: public
- interface: "{{ if_wan }}"
- permanent: true
- state: enabled
- immediate: true
- when: not run_in_installer|default(false)|bool
-
-- name: enable masquerading
- firewalld:
- zone: public
- masquerade: 'yes'
- permanent: true
- state: enabled
- immediate: true
- when: not run_in_installer|default(false)|bool
-
-- name: add LAN interface to internal zone
- firewalld:
- zone: internal
- interface: "{{ if_lan }}"
- permanent: true
- state: enabled
- immediate: true
- when: not run_in_installer|default(false)|bool
-
-- name: enable services
- firewalld:
- zone: internal
- service: "{{ item }}"
- permanent: true
- state: enabled
- immediate: true
- with_items:
- - dhcp
- - dns
- - tftp
- - git
- when: not run_in_installer|default(false)|bool
-
-## Use firewall-offline-cmd when run during installation:
-
-- name: add WAN interface to zone public
- command: "firewall-offline-cmd --zone=public --add-interface={{ if_wan }}"
- when: run_in_installer|default(false)|bool
-
-- name: enable masquerading
- command: "firewall-offline-cmd --zone=public --add-masquerade"
- when: run_in_installer|default(false)|bool
-
-- name: add LAN interface to zone intern
- command: "firewall-offline-cmd --zone=internal --add-interface={{ if_lan }}"
- when: run_in_installer|default(false)|bool
-
-- name: enable services
- command: >-
- firewall-offline-cmd --zone=internal
- --add-service=dhcp
- --add-service=dns
- --add-service=tftp
- --add-service=git
- when: run_in_installer|default(false)|bool
diff --git a/roles/firewalld2if/templates/interfaces-static.j2 b/roles/firewalld2if/templates/interfaces-static.j2
deleted file mode 100644
index 9724fa4..0000000
--- a/roles/firewalld2if/templates/interfaces-static.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-auto {{ if_lan }}
-allow-hotplug {{ if_lan }}
-iface {{ if_lan }} inet static
- address {{ ipaddr_lan }}
diff --git a/roles/fvs-client/handlers/main.yml b/roles/fvs-client/handlers/main.yml
deleted file mode 100644
index 6a3b3d5..0000000
--- a/roles/fvs-client/handlers/main.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-- name: run update-grub
- command: update-grub
- listen: update grub
-
-- name: enable tmp.mount
- systemd:
- daemon_reload: yes
- name: tmp.mount
- enabled: yes
- listen: enable tmp.mount
diff --git a/roles/fvs-client/tasks/main.yml b/roles/fvs-client/tasks/main.yml
deleted file mode 100644
index 6a98698..0000000
--- a/roles/fvs-client/tasks/main.yml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-- name: set homepage
- lineinfile:
- dest: /etc/firefox-esr/firefox-esr.js
- line: pref("browser.startup.homepage", "https://www.startpage.com");
-
- #- name: set capabilities (wireshark)
- #capabilities:
- #path: /usr/bin/dumpcap
- #capability: cap_net_raw,cap_net_admin+eip
- #state: present
-
-
-############## extra data partition ###############
-#- name: all devices
-# set_fact:
-# all_devices: "{{ ansible_devices.keys() | select('match', '^sd(.*)$|^nv(.*)$') | list | sort }}"
-#
-#- name: mount data partition
-# mount:
-# src: "UUID={{ hostvars[inventory_hostname]['ansible_devices'][all_devices[-1]]['partitions']['%s1'|format(item)]['uuid'] }}"
-# path: /home/data
-# fstype: ext4
-# state: mounted
-# register: data_mounted
-# when: all_devices | length > 1
-#
-#- name: set sticky bit on data directory
-# file:
-# path: /home/data
-# state: directory
-# mode: '1777'
-# when: data_mounted.changed
-
-################# from kiosk.yml ##################
-- name: grub timeout
- lineinfile:
- dest: /etc/default/grub
- regexp: '^(GRUB_TIMEOUT=).*'
- line: '\g<1>1'
- backrefs: yes
- notify: update grub
-
-- name: keyboard compose key
- lineinfile:
- dest: /etc/default/keyboard
- regexp: '^(XKBOPTIONS=).*'
- line: '\1"compose:caps"'
- backrefs: yes
-
-- name: tmp on tmpfs
- shell: cp /usr/share/systemd/tmp.mount /etc/systemd/system/
- args:
- creates: /etc/systemd/system/tmp.mount
- notify: enable tmp.mount
-
-## make sure gnome keyring-daemon is not started on sshfs:
-- name: disable gnome keyring-daemon
- command: dpkg-divert --divert /usr/bin/gnome-keyring-daemon.bak --rename /usr/bin/gnome-keyring-daemon
- args:
- creates: /usr/bin/gnome-keyring-daemon.bak
diff --git a/roles/fvs-mount/defaults/main.yml b/roles/fvs-mount/defaults/main.yml
deleted file mode 100644
index d27fc27..0000000
--- a/roles/fvs-mount/defaults/main.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-smb_server: "smb.steinbeisschule-reutlingen.de"
-home_server: "home.steinbeisschule-reutlingen.de"
-smb_home: "DOCS/fvs/home/"
-smb_share: "DOCS/fvs/tausch/"
-ssh_hostkey: '|1|vZQ8Yc2MBY3tYCzTCVOmaIRnep8=|kCp5RNmtBR7WSBX6L9fo9URSOmI= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFil1umj7jbBfJ7o80WDXToPidypuD915VNM7mN6mMF/gSJ7QYKtYDgBOR5KDUSB5dvc/itlSobw4rYQr2rE5dQ='
diff --git a/roles/fvs-mount/tasks/main.yml b/roles/fvs-mount/tasks/main.yml
deleted file mode 100644
index 6b84542..0000000
--- a/roles/fvs-mount/tasks/main.yml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- name: install needed packages
- apt:
- name:
- - libpam-mount
- - cifs-utils
- - sshfs
- state: latest
-
-- name: configure pam_mount
- blockinfile:
- dest: /etc/security/pam_mount.conf.xml
- block: |
- rootansibleDebian-gdmvirti
-
- rootansibleDebian-gdmvirti
-
- rootansibleDebian-gdmvirti
- insertafter: ""
-
-- name: make sure .ssh exists
- file:
- path: /root/.ssh
- state: directory
- mode: '0700'
-
-- name: provide public key of home server
- lineinfile:
- path: /root/.ssh/known_hosts
- line: "{{ ssh_hostkey }}"
- create: yes
diff --git a/roles/fvs-sssd/defaults/main.yml b/roles/fvs-sssd/defaults/main.yml
deleted file mode 100644
index dd40e38..0000000
--- a/roles/fvs-sssd/defaults/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-basedn: "ou=Benutzer,ou=fvs,ou=SCHULEN,o=ml3"
-ldap_server: "ldap.steinbeisschule-reutlingen.de"
diff --git a/roles/fvs-sssd/handlers/main.yml b/roles/fvs-sssd/handlers/main.yml
deleted file mode 100644
index c7c508b..0000000
--- a/roles/fvs-sssd/handlers/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-- name: restart sssd
- service: name=sssd state=restarted enabled=yes
- listen: "restart sssd"
diff --git a/roles/fvs-sssd/tasks/main.yml b/roles/fvs-sssd/tasks/main.yml
deleted file mode 100644
index 3879cfa..0000000
--- a/roles/fvs-sssd/tasks/main.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- name: install needed packages
- apt:
- name:
- - sssd-ldap
- state: latest
-
-- name: add URI to ldap.conf
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "URI ldaps://{{ ldap_server }}/"
- insertafter: "#URI.*"
-
-- name: add BASE to ldap.conf
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "BASE {{ basedn }}"
- insertafter: "#BASE.*"
-
-- name: do not verify cert
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "LDAPTLS_REQCERT never"
-
-- name: provide identities from directory
- template:
- src: sssd.conf.j2
- dest: /etc/sssd/sssd.conf
- mode: 0600
- notify: restart sssd
diff --git a/roles/fvs-sssd/templates/sssd.conf.j2 b/roles/fvs-sssd/templates/sssd.conf.j2
deleted file mode 100644
index bc39a46..0000000
--- a/roles/fvs-sssd/templates/sssd.conf.j2
+++ /dev/null
@@ -1,21 +0,0 @@
-[sssd]
-domains = LDAP
-config_file_version = 2
-
-[nss]
-filter_groups = root
-filter_users = root
-
-[pam]
-
-[domain/LDAP]
-id_provider = ldap
-ldap_uri = ldaps://{{ ldap_server }}/
-ldap_search_base = {{ basedn }}
-
-auth_provider = ldap
-auto_private_groups = true
-
-cache_credentials = true
-
-ldap_tls_reqcert = never
diff --git a/roles/gnome/files/defaults b/roles/gnome/files/defaults
deleted file mode 100644
index ffde793..0000000
--- a/roles/gnome/files/defaults
+++ /dev/null
@@ -1,34 +0,0 @@
-[org/gnome/shell]
-enabled-extensions=['apps-menu@gnome-shell-extensions.gcampax.github.com', 'window-list@gnome-shell-extensions.gcampax.github.com', 'places-menu@gnome-shell-extensions.gcampax.github.com', 'drive-menu@gnome-shell-extensions.gcampax.github.com', 'dash-to-dock@micxgx.gmail.com']
-
-[org/gnome/desktop/input-sources]
-sources=[('xkb', 'de'), ('xkb', 'us')]
-
-[org/gnome/desktop/wm/preferences]
-button-layout='appmenu:minimize,maximize,close'
-
-[org/gnome/desktop/peripherals/touchpad]
-natural-scroll=false
-edge-scrolling-enabled=true
-tap-to-click=true
-
-[org/gnome/nautilus/preferences]
-default-folder-viewer='list-view'
-
-[org/gnome/nautilus/list-view]
-use-tree-view=true
-
-[org/gnome/settings-daemon/plugins/power]
-power-button-action='interactive'
-sleep-inactive-battery-timeout=600
-sleep-inactive-battery-type='hibernate'
-sleep-inactive-ac-timeout=6000
-sleep-inactive-ac-type='nothing'
-
-[org/gnome/desktop/screensaver]
-lock-enabled=false
-
-[org/gnome/desktop/interface]
-clock-show-date=true
-clock-show-seconds=true
-clock-show-weekday=true
diff --git a/roles/gnome/files/user b/roles/gnome/files/user
deleted file mode 100644
index aca0641..0000000
--- a/roles/gnome/files/user
+++ /dev/null
@@ -1,2 +0,0 @@
-user-db:user
-system-db:local
diff --git a/roles/gnome/handlers/main.yml b/roles/gnome/handlers/main.yml
deleted file mode 100644
index c29a95b..0000000
--- a/roles/gnome/handlers/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: update dconf
- command: dconf update
- listen: update dconf
-
-- name: update grub
- command: update-grub
- listen: update grub
diff --git a/roles/gnome/tasks/main.yml b/roles/gnome/tasks/main.yml
deleted file mode 100644
index 2ab9029..0000000
--- a/roles/gnome/tasks/main.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-# - name: gnome hibernate by default
-# apt: name=gnome-shell-extension-suspend-button state=latest # noqa package-latest
-
-- name: gnome desktop
- apt:
- name:
- - task-gnome-desktop
- - cups
- - ssh-askpass-gnome
- - gnome-shell-extension-dashtodock
- state: latest # noqa package-latest
-
-- name: make sure /etc/dconf/profile/ exists
- file:
- path: /etc/dconf/profile/
- state: directory
- recurse: true
-
-- name: prepare for gnome customized defaults
- copy:
- src: user
- dest: /etc/dconf/profile/user
- mode: 0644
- notify: update dconf
-
-- name: make sure /etc/dconf/db/local.d/ exists
- file:
- path: /etc/dconf/db/local.d/
- state: directory
- recurse: true
-
-- name: modify gnome defaults
- copy:
- src: defaults
- dest: /etc/dconf/db/local.d/defaults
- mode: 0644
- notify: update dconf
-
-- name: configure gdm3
- replace:
- dest: /etc/gdm3/greeter.dconf-defaults
- regexp: "{{ item.rex }}"
- replace: "{{ item.rep }}"
- loop:
- - rex: "# disable-user-list=.*"
- rep: "disable-user-list=true"
- - rex: "# sleep-inactive-ac-timeout=.*"
- rep: "sleep-inactive-ac-timeout=600"
- - rex: "# sleep-inactive-ac-type=.*"
- rep: "sleep-inactive-ac-type='interactive'\npower-button-action='interactive'"
-
-## Bug #698504
-- name: allow print job management
- replace:
- dest: "/etc/cups/cups-files.conf"
- regexp: '^(SystemGroup lpadmin)$'
- replace: '\1 root'
-
-- name: enable splash screen
- replace:
- dest: "/etc/default/grub"
- regexp: '"quiet"$'
- replace: '"quiet splash"'
- notify: update grub
diff --git a/roles/kde/handlers/main.yml b/roles/kde/handlers/main.yml
deleted file mode 100644
index 855b467..0000000
--- a/roles/kde/handlers/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-- name: update grub
- command: update-grub
- listen: update grub
diff --git a/roles/kde/tasks/main.yml b/roles/kde/tasks/main.yml
deleted file mode 100644
index f09eb42..0000000
--- a/roles/kde/tasks/main.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-- name: kde plasma desktop
- apt:
- name:
- - task-kde-desktop
- - sddm-theme-debian-breeze
- - cups
- state: latest # noqa package-latest
-
-## Bug #698504
-- name: allow print job management
- replace:
- dest: "/etc/cups/cups-files.conf"
- regexp: '^(SystemGroup lpadmin)$'
- replace: '\1 root'
-
-- name: enable splash screen
- replace:
- dest: "/etc/default/grub"
- regexp: '"quiet"$'
- replace: '"quiet splash"'
- notify: update grub
-
-- name: switch default browser
- blockinfile:
- path: /etc/xdg/kdeglobals
- block: |
- #[General]
- #BrowserApplication=firefox-esr.desktop
- create: true
-
-- name: add some favorites to the KDE menu
- blockinfile:
- path: /etc/xdg/kickoffrc
- block: |
- #[Favorites]
- #FavoriteURLs=firefox-esr.desktop,org.kde.dolphin.desktop,libreoffice-startcenter.desktop,org.kde.okular.desktop,org.kde.kate.desktop,gimp.desktop,inkscape.desktop,vlc.desktop,org.kde.konsole.desktop
- create: true
diff --git a/roles/kiosk/files/kde5rc b/roles/kiosk/files/kde5rc
deleted file mode 100644
index d7525ca..0000000
--- a/roles/kiosk/files/kde5rc
+++ /dev/null
@@ -1,8 +0,0 @@
-[KDE Action Restrictions][$i]
-action/start_new_session=false
-action/switch_user=false
-action/lock_screen=false
-action/logout=false
-
-[General]
-BrowserApplication=firefox-esr.desktop
diff --git a/roles/kiosk/files/kscreenlockerrc b/roles/kiosk/files/kscreenlockerrc
deleted file mode 100644
index 0ac7312..0000000
--- a/roles/kiosk/files/kscreenlockerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-[Daemon][$i]
-Autolock=false
-LockOnResume=false
diff --git a/roles/kiosk/handlers/main.yml b/roles/kiosk/handlers/main.yml
deleted file mode 100644
index cacbe56..0000000
--- a/roles/kiosk/handlers/main.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-- name: run update-grub
- command: update-grub
- listen: update grub
-
-- name: reload NetworkManager
- when: not run_in_installer|default(false)|bool
- systemd:
- daemon_reload: true
- name: NetworkManager
- state: reloaded
- enabled: true
- listen: reload NetworkManager
-
-- name: enable tmp.mount
- systemd:
- daemon_reload: true
- name: tmp.mount
- enabled: true
- listen: enable tmp.mount
diff --git a/roles/kiosk/tasks/main.yml b/roles/kiosk/tasks/main.yml
deleted file mode 100644
index accf9b8..0000000
--- a/roles/kiosk/tasks/main.yml
+++ /dev/null
@@ -1,115 +0,0 @@
-## Check which display manager is used:
-- name: check if gdm3 is installed
- stat: path=/etc/gdm3/daemon.conf
- register: gdm3
-
-- name: check if sddm is installed
- stat: path=/usr/bin/sddm
- register: sddm
-
-## gdm3:
-- name: enable auto login in gdm3
- lineinfile:
- dest: /etc/gdm3/daemon.conf
- insertafter: '^#\s*AutomaticLoginEnable = true'
- line: 'AutomaticLoginEnable = true'
- when: gdm3.stat.exists
-
-- name: auto login user in gdm3
- lineinfile:
- dest: /etc/gdm3/daemon.conf
- insertafter: '^#\s*AutomaticLogin = '
- line: 'AutomaticLogin = {{ auto_user }}'
- when: gdm3.stat.exists
-
-## sddm/KDE:
-- name: enable auto login in sddm
- when: sddm.stat.exists
- template:
- src: sddm.conf.j2
- dest: /etc/sddm.conf
- mode: 0644
-
-- name: kde global defaults
- when: sddm.stat.exists
- copy:
- src: kde5rc
- dest: /etc/kde5rc
- mode: 0644
-
-- name: modify kde screen lock
- when: sddm.stat.exists
- copy:
- src: kscreenlockerrc
- dest: /etc/xdg/kscreenlockerrc
- mode: 0644
-
-########
-
-- name: graphics quirk
- when: ansible_product_name == "HP 500" or ansible_product_name == "HP 550"
- lineinfile:
- dest: /etc/default/grub
- regexp: '^(GRUB_CMDLINE_LINUX=)""'
- line: '\1"video=SVIDEO-1:d"'
- backrefs: true
- notify: update grub
-
-- name: grub timeout
- lineinfile:
- dest: /etc/default/grub
- regexp: '^(GRUB_TIMEOUT=).*'
- line: '\g<1>1'
- backrefs: true
- notify: update grub
-
-- name: keyboard compose key
- lineinfile:
- dest: /etc/default/keyboard
- regexp: '^(XKBOPTIONS=).*'
- line: '\1"compose:caps"'
- backrefs: true
-
-- name: hibernate when lid is closed
- lineinfile:
- dest: /etc/systemd/logind.conf
- insertafter: '^#\s*HandleLidSwitch='
- line: 'HandleLidSwitch=hibernate'
-
-- name: tmp on tmpfs
- copy:
- src: /usr/share/systemd/tmp.mount
- dest: /etc/systemd/system/tmp.mount
- mode: 0644
- remote_src: true
- notify: enable tmp.mount
-
-- name: mount tmpfs on /home/{{ auto_user }}
- mount:
- name: /home/{{ auto_user }}
- src: tmpfs
- fstype: tmpfs
- opts: uid=1001,gid=1001,mode=755,size=4G
- state: mounted
-
-- name: add autologin user
- user:
- name: "{{ auto_user }}"
- comment: "Autologin Debian User,,,"
- shell: /bin/bash
- createhome: false
- password: '*'
-
-- name: check if NetworkManager is installed
- stat: path=/etc/NetworkManager/system-connections
- register: networkmanager
-
-- name: add wifi config
- template:
- src: wifi.j2
- dest: /etc/NetworkManager/system-connections/{{ wifi_ssid }}
- owner: root
- group: root
- mode: 0600
- when: networkmanager.stat.exists
- notify: reload NetworkManager
diff --git a/roles/kiosk/templates/sddm.conf.j2 b/roles/kiosk/templates/sddm.conf.j2
deleted file mode 100644
index 7d36fa9..0000000
--- a/roles/kiosk/templates/sddm.conf.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-[Autologin]
-Relogin=true
-Session=plasma.desktop
-User={{ auto_user }}
diff --git a/roles/kiosk/templates/wifi.j2 b/roles/kiosk/templates/wifi.j2
deleted file mode 100644
index e4bc20e..0000000
--- a/roles/kiosk/templates/wifi.j2
+++ /dev/null
@@ -1,18 +0,0 @@
-[connection]
-id={{ wifi_ssid }}
-uuid=a9064ab4-e5fc-49d7-bb6d-8a6073c0e757
-type=wifi
-
-[wifi]
-ssid={{ wifi_ssid }}
-security=802-11-wireless-security
-
-[wifi-security]
-key-mgmt=wpa-psk
-psk={{ wifi_passwd }}
-
-[ipv4]
-method=auto
-
-[ipv6]
-method=auto
diff --git a/roles/krb5kdcldap/defaults/main.yml b/roles/krb5kdcldap/defaults/main.yml
deleted file mode 100644
index 0aa00f0..0000000
--- a/roles/krb5kdcldap/defaults/main.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-kdc_master_pwd: "{{ lookup('password', '/tmp/kdc_master.pwd chars=ascii_letters,digits length=32') }}"
-kdc_master_pwd_file: "/root/kdc-master.pwd"
-
-kdc_service_pwd: "{{ lookup('password', '/tmp/kdc-service.pwd chars=ascii_letters,digits length=32') }}"
-kadmin_service_pwd: "{{ lookup('password', '/tmp/kadmin-service.pwd chars=ascii_letters,digits length=32') }}"
-
-kadmin_pwd: "{{ lookup('password', '/tmp/kadmin.pwd chars=ascii_letters,digits length=32') }}"
-kadmin_pwd_file: "/root/kadmin.pwd"
diff --git a/roles/krb5kdcldap/handlers/main.yml b/roles/krb5kdcldap/handlers/main.yml
deleted file mode 100644
index 098de30..0000000
--- a/roles/krb5kdcldap/handlers/main.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-- name: restart slapd
- systemd: name=slapd state=restarted enabled=yes
- listen: "restart slapd"
-
-- name: restart krb5-kdc
- systemd: name=krb5-kdc state=restarted enabled=yes
- listen: "restart krb5-kdc"
-
-- name: restart krb5-admin-server
- systemd: name=krb5-admin-server state=restarted enabled=yes
- listen: "restart krb5-admin-server"
diff --git a/roles/krb5kdcldap/meta/main.yml b/roles/krb5kdcldap/meta/main.yml
deleted file mode 100644
index 36ca9ba..0000000
--- a/roles/krb5kdcldap/meta/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-dependencies: # noqa meta-no-info
- - role: ldap
diff --git a/roles/krb5kdcldap/tasks/main.yml b/roles/krb5kdcldap/tasks/main.yml
deleted file mode 100644
index fc3cce1..0000000
--- a/roles/krb5kdcldap/tasks/main.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-## Install and configure krb5-kdc-ldap.
----
-- name: check that domain name is available
- fail: msg="The machine's domain must not be empty."
- when: ansible_domain | length == 0
-
-- name: check if krb5kdc is already there
- stat: path=/usr/sbin/krb5kdc
- register: krb5kdc
-
-- name: install and configure krb5-kdc-ldap
- include_tasks: setup.yml
- when: not krb5kdc.stat.exists
-
-######################################################
-
-- name: allow services in firewalld
- firewalld:
- zone: internal
- service: "{{ item }}"
- permanent: true
- immediate: true
- state: enabled
- with_items:
- - kerberos
- - kadmin
- - kpasswd
-
-- name: kerberize dummy user foo
- command: kadmin.local -q 'add_principal -pw "{{ foo_pwd }}" -x dn="uid=foo,ou=people,{{ basedn }}" foo'
- register: kerberize_result
- changed_when: kerberize_result.stderr is not search('already exists while creating')
- no_log: true
- when: foo_pwd is defined and foo_pwd | length > 0
diff --git a/roles/krb5kdcldap/tasks/setup.yml b/roles/krb5kdcldap/tasks/setup.yml
deleted file mode 100644
index 158240a..0000000
--- a/roles/krb5kdcldap/tasks/setup.yml
+++ /dev/null
@@ -1,197 +0,0 @@
-## Install and configure krb5-kdc-ldap.
----
-- name: prepare krb5.conf
- template:
- src: krb5.conf.j2
- dest: /etc/krb5.conf
- mode: 0644
-
-- name: make sure krb5kdc exists
- file:
- path: /etc/krb5kdc
- state: directory
- mode: 0755
-
-- name: prepare kdc.conf
- template:
- src: kdc.conf.j2
- dest: /etc/krb5kdc/kdc.conf
- mode: 0644
-
-- name: prepare kadm5.acl
- template:
- src: kadm5.acl.j2
- dest: /etc/krb5kdc/kadm5.acl
- mode: 0644
- notify: "restart krb5-admin-server"
-
-- name: install krb5-kdc-ldap and krb5-admin-server
- apt:
- name:
- - krb5-kdc-ldap
- - krb5-admin-server
- state: latest # noqa package-latest
-
-- name: prepare kerberos.openldap.ldif
- shell: gunzip -c /usr/share/doc/krb5-kdc-ldap/kerberos.openldap.ldif.gz > /etc/ldap/schema/kerberos.openldap.ldif
- args:
- creates: /etc/ldap/schema/kerberos.openldap.ldif
-
-- name: activate kerberos.openldap.ldif schema # noqa no-changed-when
- command: ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/kerberos.openldap.ldif
-
-- name: make sure we have a kerberos container
- ldap_entry:
- dn: "cn=kerberos,{{ basedn }}"
- objectClass: krbContainer
- bind_dn: "cn=admin,{{ basedn }}"
- bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
-
-- name: make sure we have a kdc object
- ldap_entry:
- dn: "cn=kdc,cn=kerberos,{{ basedn }}"
- objectClass:
- - organizationalRole
- - simpleSecurityObject
- attributes:
- userPassword: "{{ kdc_service_pwd }}"
- bind_dn: "cn=admin,{{ basedn }}"
- bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
-
-- name: make sure we have a kadmin object
- ldap_entry:
- dn: "cn=kadmin,cn=kerberos,{{ basedn }}"
- objectClass:
- - organizationalRole
- - simpleSecurityObject
- attributes:
- userPassword: "{{ kadmin_service_pwd }}"
- bind_dn: "cn=admin,{{ basedn }}"
- bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
-
-- name: modify ACLs to account for KDC
- ldap_attrs:
- dn: "olcDatabase={1}mdb,cn=config"
- attributes:
- olcAccess:
- - >-
- to attrs=userPassword
- by self write
- by anonymous auth
- by * none
- - >-
- to attrs=shadowLastChange
- by self write
- by * read
- - >-
- to dn.subtree="cn=kerberos,{{ basedn }}"
- by dn.exact="cn=kdc,cn=kerberos,{{ basedn }}" read
- by dn.exact="cn=kadmin,cn=kerberos,{{ basedn }}" write
- by * none
- - >-
- to attrs=krbPrincipalName,krbLastPwdChange,krbPrincipalKey,krbExtraData
- by dn.exact="cn=kdc,cn=kerberos,{{ basedn }}" read
- by dn.exact="cn=kadmin,cn=kerberos,{{ basedn }}" write
- by self read
- by * auth
- - >-
- to *
- by dn.exact="cn=kadmin,cn=kerberos,{{ basedn }}" write
- by * read
- ordered: true
- state: exact
-
-- name: add KDC indexes to LDAP
- ldap_attrs:
- dn: "olcDatabase={1}mdb,cn=config"
- attributes:
- olcDbIndex:
- - objectClass eq
- - cn,uid eq
- - uidNumber,gidNumber eq
- - member,memberUid eq
- - krbPrincipalName pres,sub,eq
- state: exact
-
-- name: add AuthzRegexp to map access via kerberos/GSSAPI
- ldap_attrs:
- dn: "cn=config"
- attributes:
- olcAuthzRegexp:
- - "{0}uid=([^,]*),cn=gssapi,cn=auth uid=$1,ou=people,{{ basedn }}"
- - "{1}uid=([^,]*),cn=gs2-iakerb,cn=auth uid=$1,ou=people,{{ basedn }}"
- state: exact
-
-- name: prepare password for kdc # noqa risky-shell-pipe no-changed-when
- shell:
- >-
- echo "cn=kdc,cn=kerberos,{{ basedn }}#{HEX}$(echo -n {{ kdc_service_pwd }} |
- xxd -g0 -ps -c 256 | sed 's/0a$//')" > /etc/krb5kdc/service.keyfile ;
- chmod 0600 /etc/krb5kdc/service.keyfile
- no_log: true
-
-- name: prepare password for kadmin # noqa risky-shell-pipe no-changed-when
- shell:
- >-
- echo "cn=kadmin,cn=kerberos,{{ basedn }}#{HEX}$(echo -n {{ kadmin_service_pwd }} |
- xxd -g0 -ps -c 256 | sed 's/0a$//')" >> /etc/krb5kdc/service.keyfile ;
- chmod 0600 /etc/krb5kdc/service.keyfile
- no_log: true
-
-- name: dump kdc master password # noqa no-changed-when
- shell:
- >-
- echo -n "{{ kdc_master_pwd }}" > "{{ kdc_master_pwd_file }}" ;
- chmod 0600 "{{ kdc_master_pwd_file }}"
- no_log: true
-
-- name: initialize KDC # noqa no-changed-when
- command:
- >-
- kdb5_ldap_util
- -D cn=admin,"{{ basedn }}"
- -w "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
- -H ldapi:///
- create -s -subtrees "{{ basedn }}"
- -P "{{ kdc_master_pwd }}"
- -r "{{ ansible_domain | upper }}"
- no_log: true
- notify: "restart krb5-kdc"
-
-- name: add root/admin as kadmin # noqa no-changed-when
- command: kadmin.local -q 'addprinc -pw "{{ kadmin_pwd }}" root/admin'
-
-- name: dump kadmin password # noqa no-changed-when
- shell: echo -n "{{ kadmin_pwd }}" > "{{ kadmin_pwd_file }}" ; chmod 0600 "{{ kadmin_pwd_file }}"
- no_log: true
-
-- name: add default policy to silence warning when using kadmin # noqa no-changed-when
- command: kadmin.local -q "add_policy default"
-
-- name: create machine principals # noqa no-changed-when
- command: kadmin.local -q 'addprinc -randkey {{ item }}/{{ ansible_hostname }}.{{ ansible_domain }}'
- with_items:
- - host
- - ldap
- - HTTP
-
-- name: add principal to the default keytab # noqa no-changed-when
- command: kadmin.local -q 'ktadd {{ item }}/{{ ansible_hostname }}.{{ ansible_domain }}'
- with_items:
- - host
- - ldap
- - HTTP
-
-- name: allow slapd to read the keytab
- file:
- path: /etc/krb5.keytab
- owner: root
- group: openldap
- mode: '0640'
- notify: restart slapd
-
-- name: "make 'kerberos' an alias hostname"
- replace:
- path: /etc/hosts
- regexp: "^({{ ipaddr_lan | ipaddr('address') }}\\s.+)$"
- replace: '\1 kerberos'
diff --git a/roles/krb5kdcldap/templates/kadm5.acl.j2 b/roles/krb5kdcldap/templates/kadm5.acl.j2
deleted file mode 100644
index 5e9c641..0000000
--- a/roles/krb5kdcldap/templates/kadm5.acl.j2
+++ /dev/null
@@ -1,2 +0,0 @@
-## access control for the Kerberos KDC
-root/admin@{{ ansible_domain | upper }} *
diff --git a/roles/krb5kdcldap/templates/kdc.conf.j2 b/roles/krb5kdcldap/templates/kdc.conf.j2
deleted file mode 100644
index 7a64706..0000000
--- a/roles/krb5kdcldap/templates/kdc.conf.j2
+++ /dev/null
@@ -1,15 +0,0 @@
-[kdcdefaults]
- kdc_ports = 750,88
-
-[realms]
- {{ ansible_domain | upper }} = {
- admin_keytab = FILE:/etc/krb5kdc/kadm5.keytab
- acl_file = /etc/krb5kdc/kadm5.acl
- key_stash_file = /etc/krb5kdc/stash
- kdc_ports = 750,88
- max_life = 10h 0m 0s
- max_renewable_life = 7d 0h 0m 0s
- master_key_type = des3-hmac-sha1
- #supported_enctypes = aes256-cts:normal aes128-cts:normal
- default_principal_flags = +preauth
- }
diff --git a/roles/krb5kdcldap/templates/krb5.conf.j2 b/roles/krb5kdcldap/templates/krb5.conf.j2
deleted file mode 100644
index 11d3cf2..0000000
--- a/roles/krb5kdcldap/templates/krb5.conf.j2
+++ /dev/null
@@ -1,26 +0,0 @@
-[libdefaults]
- default_realm = {{ ansible_domain | upper }}
-
-[realms]
- {{ ansible_domain | upper }} = {
- kdc = {{ ansible_hostname }}
- admin_server = {{ ansible_hostname }}
- database_module = LDAP
- }
-
-[domain_realm]
- .{{ ansible_domain }} = {{ ansible_domain | upper }}
- {{ ansible_domain }} = {{ ansible_domain | upper }}
-
-[dbdefaults]
- ldap_kerberos_container_dn = cn=kerberos,{{ basedn }}
-
-[dbmodules]
- LDAP = {
- db_library = kldap
- ldap_kdc_dn = cn=kdc,cn=kerberos,{{ basedn }}
- ldap_kadmind_dn = cn=kadmin,cn=kerberos,{{ basedn }}
- ldap_service_password_file = /etc/krb5kdc/service.keyfile
- ldap_servers = ldapi:///
- ldap_conns_per_server = 5
- }
diff --git a/roles/lanclient/defaults/main.yml b/roles/lanclient/defaults/main.yml
deleted file mode 100644
index 29dadef..0000000
--- a/roles/lanclient/defaults/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-lan_homes: /home/lan
-basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
-ldap_server: ldap
-krb_server: kerberos
-nfs_server: nfs
-min_id_sssd: 5000
-max_id_sssd: 20000
diff --git a/roles/lanclient/handlers/main.yml b/roles/lanclient/handlers/main.yml
deleted file mode 100644
index ec063a1..0000000
--- a/roles/lanclient/handlers/main.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-- name: restart sssd
- service: name=sssd state=restarted enabled=yes
- listen: "restart sssd"
-
-- name: reload systemd
- systemd:
- daemon_reload: true
- listen: "reload systemd"
-
-- name: restart rpc-gssd
- systemd:
- name: rpc-gssd
- daemon_reload: true
- state: restarted
- notify: "restart rpc-gssd"
diff --git a/roles/lanclient/tasks/main.yml b/roles/lanclient/tasks/main.yml
deleted file mode 100644
index adaee16..0000000
--- a/roles/lanclient/tasks/main.yml
+++ /dev/null
@@ -1,99 +0,0 @@
----
-- name: check if domain name is available
- fail: msg="The machine's domain must not be empty."
- when: ansible_domain | length == 0
-
-- name: preseed krb5-config realm
- debconf:
- name: krb5-config
- question: krb5-config/default_realm
- value: "{{ ansible_domain | upper }}"
- vtype: string
-
-- name: preseed krb5-config kerberos servers
- debconf:
- name: krb5-config
- question: krb5-config/kerberos_servers
- value: "{{ krb_server }}"
- vtype: string
-
-- name: preseed krb5-config admin server
- debconf:
- name: krb5-config
- question: krb5-config/admin_server
- value: "{{ krb_server }}"
- vtype: string
-
-- name: install needed packages
- apt:
- name:
- - krb5-config
- - krb5-user
- - sssd-krb5
- - sssd-ldap
- - nfs-common
- state: latest # noqa package-latest
-
-- name: add URI to ldap.conf
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "URI ldap://ldap/"
- insertafter: "#URI.*"
-
-- name: add BASE to ldap.conf
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "BASE {{ basedn }}"
- insertafter: "#BASE.*"
-
-- name: enable pam_umask
- lineinfile:
- dest: /etc/pam.d/common-session
- line: "session optional pam_umask.so usergroups"
-
-## oddjob-mkhomedir works only with sec=sys for the NFSv4 share
-
-- name: provide identities from directory
- template:
- src: sssd.conf.j2
- dest: /etc/sssd/sssd.conf
- mode: 0600
- notify: restart sssd
-
-## Activate machine after installation:
-- name: create machine principals
- command: kadmin -p root/admin -w {{ kadmin_pwd }} -q "addprinc -randkey {{ item }}/{{ ansible_hostname }}.{{ ansible_domain }}"
- register: kerberize_result
- with_items:
- - nfs
- - host
- changed_when: kerberize_result.stderr is not search('already exists while creating')
- no_log: true
- when: not run_in_installer|default(false)|bool and kadmin_pwd | length > 0
-
-- name: remove old keytab
- file:
- path: /etc/krb5.keytab
- state: absent
- when: not run_in_installer|default(false)|bool and kadmin_pwd | length > 0
-
-- name: add principals to keytab
- command: kadmin -p root/admin -w {{ kadmin_pwd }} -q "ktadd {{ item }}/{{ ansible_hostname }}.{{ ansible_domain }}"
- with_items:
- - nfs
- - host
- args:
- no_log: true
- notify: "restart rpc-gssd"
- when: not run_in_installer|default(false)|bool and kadmin_pwd | length > 0
-
-
-- name: make sure the home mount directory exists
- file: path={{ lan_homes }} state=directory recurse=yes
-
-- name: automount
- lineinfile:
- dest: /etc/fstab
- line: "{{ nfs_server }}:/home {{ lan_homes }} nfs4 sec=krb5p,_netdev,noauto,x-systemd.automount,x-systemd.idle-timeout=60 0 0"
- notify: reload systemd
- when: not run_in_installer|default(false)|bool
diff --git a/roles/lanclient/templates/sssd.conf.j2 b/roles/lanclient/templates/sssd.conf.j2
deleted file mode 100644
index 91d230e..0000000
--- a/roles/lanclient/templates/sssd.conf.j2
+++ /dev/null
@@ -1,22 +0,0 @@
-[sssd]
-domains = LDAP
-config_file_version = 2
-
-[nss]
-filter_groups = root
-filter_users = root
-
-[pam]
-
-[domain/LDAP]
-id_provider = ldap
-ldap_uri = ldap://{{ ldap_server }}/
-ldap_search_base = {{ basedn }}
-
-auth_provider = krb5
-krb5_server = {{ krb_server }}
-krb5_realm = {{ ansible_domain | upper }}
-cache_credentials = true
-
-min_id = {{ min_id_sssd }}
-max_id = {{ max_id_sssd }}
diff --git a/roles/ldap/defaults/main.yml b/roles/ldap/defaults/main.yml
deleted file mode 100644
index 32da1a2..0000000
--- a/roles/ldap/defaults/main.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-ldap_admin_pwd: "{{ lookup('password', '/tmp/ldap_admin.pwd chars=ascii_letters,digits length=32') }}"
-ldap_admin_pwd_file: "/root/ldap-admin.pwd"
-basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
-certpub: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
-certpriv: "/etc/ssl/private/ssl-cert-snakeoil.key"
-lan_homes: /home/lan
-min_id: 10000
-max_id: 20000
-ldapuser_gid: 8000
diff --git a/roles/ldap/files/slapd-config.ldif b/roles/ldap/files/slapd-config.ldif
deleted file mode 100644
index 4aead37..0000000
--- a/roles/ldap/files/slapd-config.ldif
+++ /dev/null
@@ -1,43 +0,0 @@
-#### LDAP Overlays slapd ####
-#### Attribute Uniqueness ####
-
-dn: cn=module,cn=config
-objectClass: olcModuleList
-cn: module
-olcModulePath: /usr/lib/ldap
-olcModuleLoad: unique
-
-dn: olcOverlay=unique,olcDatabase={1}mdb,cn=config
-objectClass: olcOverlayConfig
-objectClass: olcUniqueConfig
-olcOverlay: unique
-olcUniqueAttribute: uid uidNumber mail
-
-
-#### Password Hashing ####
-
-dn: cn=module,cn=config
-objectClass: olcModuleList
-cn: module
-olcModuleLoad: ppolicy
-
-dn: olcOverlay=ppolicy,olcDatabase={1}mdb,cn=config
-objectClass: olcOverlayConfig
-objectClass: olcPPolicyConfig
-olcOverlay: ppolicy
-olcPPolicyHashCleartext: TRUE
-
-
-#### Reverse Group Membership ####
-
-dn: cn=module,cn=config
-objectClass: olcModuleList
-cn: module
-olcModuleLoad: memberof
-
-dn: olcOverlay=memberof,olcDatabase={1}mdb,cn=config
-objectClass: olcOverlayConfig
-objectClass: olcMemberOf
-olcOverlay: memberof
-olcMemberOfDangling: error
-olcMemberOfRefInt: TRUE
diff --git a/roles/ldap/tasks/main.yml b/roles/ldap/tasks/main.yml
deleted file mode 100644
index 6acabec..0000000
--- a/roles/ldap/tasks/main.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-## Install and configure slapd.
----
-- name: check if domain name is available
- fail: msg="The machine's domain must not be empty."
- when: ansible_domain | length == 0
-
-- name: check if slapd is already set up
- stat: path=/usr/sbin/slapd
- register: slapd
-
-- name: install and configure slapd
- include_tasks: setup.yml
- when: not slapd.stat.exists
-
-#######################################################################################
-## Use the admin password saved to file (available also after installation):
-- name: slurp admin password
- slurp:
- src: "{{ ldap_admin_pwd_file }}"
- register: ldap_admin_pwd
- no_log: true
-
-## Prepare user directories
-- name: make sure we have a people entry for users
- ldap_entry:
- dn: "ou=people,{{ basedn }}"
- objectClass: organizationalUnit
- bind_dn: "cn=admin,{{ basedn }}"
- bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
-
-- name: make sure we have a group entry for users
- ldap_entry:
- dn: "ou=groups,{{ basedn }}"
- objectClass: organizationalUnit
- bind_dn: "cn=admin,{{ basedn }}"
- bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
-
-
-- name: add group for ldap users
- ldap_entry:
- dn: "cn=ldapuser,ou=groups,{{ basedn }}"
- objectClass:
- - posixGroup
- attributes:
- gidNumber: "{{ ldapuser_gid }}"
- bind_dn: "cn=admin,{{ basedn }}"
- bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
-
-
-- name: provide simple script to manage ldap/kdc
- template:
- src: debian-lan.j2
- dest: /usr/local/sbin/debian-lan
- mode: 0744
-
-- name: allow ldap service in firewalld
- firewalld:
- zone: internal
- service: ldap
- permanent: true
- immediate: true
- state: enabled
-
-- name: add dummy user foo
- ldap_entry:
- dn: "uid=foo,ou=people,{{ basedn }}"
- objectClass:
- - inetOrgPerson
- - posixAccount
- attributes:
- cn: foo
- sn: bar
- userPassword: "{{ foo_pwd }}"
- uidNumber: "{{ min_id }}"
- gidNumber: "{{ min_id }}"
- homeDirectory: "{{ lan_homes }}/foo"
- loginShell: /bin/bash
- bind_dn: "cn=admin,{{ basedn }}"
- bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
- when: foo_pwd is defined and foo_pwd | length > 0
-
-- name: add dummy group foo
- ldap_entry:
- dn: "cn=foo,ou=groups,{{ basedn }}"
- objectClass:
- - posixGroup
- attributes:
- gidNumber: "{{ min_id }}"
- bind_dn: "cn=admin,{{ basedn }}"
- bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
- when: foo_pwd is defined and foo_pwd | length > 0
diff --git a/roles/ldap/tasks/setup.yml b/roles/ldap/tasks/setup.yml
deleted file mode 100644
index 013ebf8..0000000
--- a/roles/ldap/tasks/setup.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-## Install and configure slapd.
----
-- name: preseed ldap domain
- debconf:
- name: slapd
- question: slapd/domain
- value: "{{ ansible_domain }}"
- vtype: string
-
-- name: preseed slapd admin password1
- debconf:
- name: slapd
- question: slapd/password1
- value: "{{ ldap_admin_pwd }}"
- vtype: password
- no_log: true
-
-- name: preseed slapd admin password2
- debconf:
- name: slapd
- question: slapd/password2
- value: "{{ ldap_admin_pwd }}"
- vtype: password
- no_log: true
-
-- name: dump admin password
- shell:
- cmd: echo -n "{{ ldap_admin_pwd }}" > "{{ ldap_admin_pwd_file }}" ; chmod 0600 "{{ ldap_admin_pwd_file }}"
- creates: "{{ ldap_admin_pwd_file }}"
- no_log: true
-
-- name: install packages for LDAP
- apt:
- name:
- - slapd
- - ldap-utils
- - ldapvi
- - python3-ldap
- - ssl-cert
- state: latest # noqa package-latest
-
-- name: add openldap to the ssl-cert group
- user:
- name: openldap
- groups: ssl-cert
- append: true
-
-- name: restart slapd with access to ssl-cert
- systemd: name=slapd state=restarted
-
-- name: make initial slapd configuration available
- copy:
- src: slapd-config.ldif
- dest: /etc/ldap/slapd.d/
- mode: 0644
-
-- name: make slapd TLS configuration available
- template:
- src: slapd-TLS.ldif
- dest: /etc/ldap/slapd.d/
- mode: 0644
-
-- name: activate ppolicy schema
- command: ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif # noqa no-changed-when
-
-- name: initialize slapd if it has just been installed
- command: ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/slapd.d/slapd-config.ldif # noqa no-changed-when
-
-- name: configure LDAP TLS
- command: ldapmodify -Y EXTERNAL -H ldapi:/// -f /etc/ldap/slapd.d/slapd-TLS.ldif # noqa no-changed-when
-
-- name: add URI to ldap.conf
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "URI ldapi:///"
- insertafter: "#URI.*"
-
-- name: add BASE to ldap.conf
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "BASE {{ basedn }}"
- insertafter: "#BASE.*"
-
-- name: check against self signed certificate
- replace:
- path: /etc/ldap/ldap.conf
- regexp: "^(TLS_CACERT\\s+/etc/ssl/certs/ca-certificates.crt)$"
- replace: '#\1\nTLS_CACERT\t{{ certpub }}'
-
-- name: "make 'ldap' an alias hostname"
- replace:
- path: /etc/hosts
- regexp: "^({{ ipaddr_lan | ipaddr('address') }}\\s.+)$"
- replace: '\1 ldap'
-
-- name: enable pam-mkhomedir
- command: pam-auth-update --enable mkhomedir
- when: foo_pwd is defined and foo_pwd | length > 0
-
-## Use 'sudo ldapvi -Y EXTERNAL -h ldapi:/// -b "cn=config"' to modify certificate and key.
diff --git a/roles/ldap/templates/debian-lan.j2 b/roles/ldap/templates/debian-lan.j2
deleted file mode 100644
index b2014e1..0000000
--- a/roles/ldap/templates/debian-lan.j2
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/bin/bash
-#
-# A simple script to add users and their group to ldap, as well as a kerberos principal.
-#
-
-set -eu
-
-usage(){
- cat < |none
- $(basename "$0") adduser []
- $(basename "$0") deluser
- $(basename "$0") delhost
- $(basename "$0") ldapvi
- $(basename "$0")
-
- : User ID (login name)
- : Password
- : If given and not "none", the user is added to this posix group (in addition to his
- personal group). The group must already exist in the LDAP DT.
- , : LDAP attributes 'givenName' and 'sn'. If omitted, is used.
- : File containing lines of the form:
-
- adduser
- adduser
- …
- deluser
- deluser
- …
- Every line is processed like a single call to the $(basename "$0") program.
-EOF
-}
-
-BASEDN="{{ basedn }}"
-LDAPADMIN="cn=admin,$BASEDN"
-ADPASSWD="$(cat {{ ldap_admin_pwd_file }})"
-
-if [ $# -lt 2 ] ; then
- if [ $# = 0 ] ; then
- usage
- exit 1
- elif [ "$1" = ldapvi ] ; then
- exec ldapvi -m -h ldapi:/// -D "$LDAPADMIN" -b "$BASEDN" -w "$ADPASSWD"
- elif [ -r "$1" ]; then
- ## recursively call this program:
- while read -r LINE ; do
- $0 $LINE
- done < "$1"
- ## reset cache after mass import/deletion:
- which sss_cache > /dev/null && sss_cache -U -G
- exit 0
- else
- usage
- exit 1
- fi
-elif [ "$1" = adduser ] && [ $# -lt 3 ] ; then
- echo "Error: Password missing."
- usage
- exit 1
-fi
-
-## Range of user and personal group IDs:
-MINID={{ min_id }}
-MAXID={{ max_id }}
-
-## Range to cover in a single ldap search (must be smaller than 'olcSizeLimit' in cn=config):
-RANGE=399
-
-HOMES="{{ lan_homes }}"
-
-COMMAND="$1"
-id="$2"
-pw="${3:-""}"
-grp="${4:-""}"
-gn="${5:-$2}"
-sn="${6:-$2}"
-
-domain="$(hostname -d)"
-
-if [ -x /usr/sbin/kadmin.local ] ; then
- KRB5=true
- pwEntry=""
-else
- KRB5=false
- pwEntry="userPassword: $pw"
-fi
-
-##################################################################################################
-
-nextnum(){
- local id=$MINID
- local bsta bend all uids gids num
-
- ## Search for the next pair of identical free IDs:
- while [ "$id" -le "$MAXID" ] ; do
- bsta=$id
- bend=$(( bsta + RANGE ))
-
- all="$(seq "$bsta" "$bend")"
- uids="$(ldapsearch -Y EXTERNAL -H ldapi:/// -LLL -b "ou=people,$BASEDN" "(&(objectClass=posixAccount)(uidNumber>=$bsta)(uidNumber<=$bend))" \
- uidNumber 2>/dev/null | grep "uidNumber: " | cut -f2 -d ' ' | sort -g | uniq)"
- gids="$(ldapsearch -Y EXTERNAL -H ldapi:/// -LLL -b "ou=groups,$BASEDN" "(&(objectClass=posixGroup)(gidNumber>=$bsta)(uidNumber<=$bend))" \
- gidNumber 2>/dev/null | grep "gidNumber: " | cut -f2 -d ' ' | sort -g | uniq)"
-
- fuids="$(comm -13 <(echo "$uids") <(echo "$all"))"
- fgids="$(comm -13 <(echo "$gids") <(echo "$all"))"
- num=$(comm -12 <(echo "$fuids") <(echo "$fgids") | head -1)
-
- if [ -n "$num" ] ; then
- echo "$num"
- return
- else
- id=$(( bend + 1 ))
- fi
- done
- ## something went wrong:
- exit 1
-}
-
-
-add-user(){
- local id="$1"
- local pwEntry="$2"
- local grp="$3"
- local gn="$4"
- local sn="$5"
- local uidNumber
- local gidNumber
-
- if ldapsearch -Y EXTERNAL -H ldapi:/// -LLL -b "ou=people,$BASEDN" "(&(objectClass=posixAccount)(uid=$id))" uid 2>/dev/null \
- | grep -q "uid: $id" ; then
- echo "User '$id' exists already, skipping."
- return
- fi
-
- uidNumber=$(nextnum)
- gidNumber=$uidNumber
-
- if [ "$uidNumber" -ge "$MAXID" ] || [ "$gidNumber" -ge "$MAXID" ] ; then
- echo "Error: $uidNumber and/or $gidNumber exceed max ID number ${MAXID}."
- exit 1
- fi
-
- cat <&1 \
- | sed '/ldap_initialize/d'
-
- for grp in $(ldapsearch -Y EXTERNAL -H ldapi:/// -LLL -b "ou=groups,$BASEDN" "(&(objectClass=posixGroup)(memberUid=${id}))" cn 2>/dev/null \
- | grep cn: | cut -d ' ' -f2) ; do
- cat < /dev/null && sss_cache -U -G ## clear cache
-echo "==== $* ===="
-case $COMMAND in
- adduser)
- add-user "${id}" "${pwEntry}" "${grp}" "${gn}" "${sn}"
- ;;
- deluser)
- del-user "${id}"
- ;;
- delhost)
- del-host "${id}"
- ;;
- *)
- usage
- ;;
-esac
diff --git a/roles/ldap/templates/slapd-TLS.ldif b/roles/ldap/templates/slapd-TLS.ldif
deleted file mode 100644
index 236841f..0000000
--- a/roles/ldap/templates/slapd-TLS.ldif
+++ /dev/null
@@ -1,9 +0,0 @@
-#### ENABLE LDAP TLS ####
-dn: cn=config
-changetype: modify
-add: olcTLSCertificateFile
-olcTLSCertificateFile: {{ certpub }}
--
-add: olcTLSCertificateKeyFile
-olcTLSCertificateKeyFile: {{ certpriv }}
--
diff --git a/roles/lowpower/files/powertop.service b/roles/lowpower/files/powertop.service
deleted file mode 100644
index 150c2ff..0000000
--- a/roles/lowpower/files/powertop.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Run powertop --auto-tune
-
-[Service]
-Type=oneshot
-ExecStart=/usr/sbin/powertop --auto-tune
diff --git a/roles/lowpower/files/powertop.timer b/roles/lowpower/files/powertop.timer
deleted file mode 100644
index 4cd5f71..0000000
--- a/roles/lowpower/files/powertop.timer
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Run powertop --auto-tune after boot
-
-[Timer]
-OnBootSec=1min
-AccuracySec=1min
-
-[Install]
-WantedBy=timers.target
diff --git a/roles/lowpower/handlers/main.yml b/roles/lowpower/handlers/main.yml
deleted file mode 100644
index c0c1c9a..0000000
--- a/roles/lowpower/handlers/main.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-- name: enable powertop timer
- systemd:
- name: powertop.timer
- enabled: true
- listen: "enable powertop timer"
diff --git a/roles/lowpower/tasks/main.yml b/roles/lowpower/tasks/main.yml
deleted file mode 100644
index a4fc825..0000000
--- a/roles/lowpower/tasks/main.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-- name: install some packages
- apt: name={{ item }} state=latest # noqa package-latest
- with_items:
- - powertop
-
-- name: install powertop.service
- copy:
- src: powertop.service
- dest: /etc/systemd/system/powertop.service
- mode: 0644
-
-- name: install powertop.timer
- copy:
- src: powertop.timer
- dest: /etc/systemd/system/powertop.timer
- mode: 0644
- notify: enable powertop timer
diff --git a/roles/netbootinstaller/defaults/main.yml b/roles/netbootinstaller/defaults/main.yml
deleted file mode 100644
index 2b791ea..0000000
--- a/roles/netbootinstaller/defaults/main.yml
+++ /dev/null
@@ -1 +0,0 @@
-tftp_root: "/var/lib/tftpboot"
diff --git a/roles/netbootinstaller/handlers/main.yml b/roles/netbootinstaller/handlers/main.yml
deleted file mode 100644
index 75ce256..0000000
--- a/roles/netbootinstaller/handlers/main.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-- name: bind mount images
- mount:
- path: "{{ tftp_root }}/d-i/n-pkg/"
- src: /usr/lib/debian-installer/
- fstype: none
- state: mounted
- opts: bind
- listen: bind mount images
-
-- name: rebuild di-netboot-assistant menu
- command: "{{ item }}"
- with_items:
- - di-netboot-assistant rebuild-menu
- - di-netboot-assistant rebuild-grub
- listen: rebuild di-netboot-assistant menu
diff --git a/roles/netbootinstaller/tasks/main.yml b/roles/netbootinstaller/tasks/main.yml
deleted file mode 100644
index 1296b0b..0000000
--- a/roles/netbootinstaller/tasks/main.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-- name: make preseed directory available
- file:
- path: "{{ tftp_root }}/d-i/{{ di_dist }}"
- state: directory
- mode: 0755
-
-- name: install di-netboot-assistant and installer package
- apt:
- name:
- - di-netboot-assistant
- - "{{ di_pkg }}"
- state: latest # noqa package-latest
- notify:
- - bind mount images
- - rebuild di-netboot-assistant menu
-
-- name: provide preseed file
- copy:
- src: /usr/share/doc/di-netboot-assistant/examples/preseed.cfg
- dest: "{{ tftp_root }}/d-i/{{ di_dist }}"
- mode: 0644
- force: false
- remote_src: true
-
-- name: make the hostname resolvable from the LAN
- replace:
- path: /etc/hosts
- regexp: '^(127\.0\.1\.1.*)$'
- replace: '#\1\n{{ ipaddr_lan | ipaddr("address") }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }}'
- when: ipaddr_lan is defined
diff --git a/roles/networkdresolved/files/all-eth.network b/roles/networkdresolved/files/all-eth.network
deleted file mode 100644
index f2578d1..0000000
--- a/roles/networkdresolved/files/all-eth.network
+++ /dev/null
@@ -1,5 +0,0 @@
-[Match]
-Name=e*
-
-[Network]
-DHCP=yes
diff --git a/roles/networkdresolved/handlers/main.yml b/roles/networkdresolved/handlers/main.yml
deleted file mode 100644
index 457c60b..0000000
--- a/roles/networkdresolved/handlers/main.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-- name: restart and enable systemd-networkd
- systemd:
- name: systemd-networkd
- enabled: true
- state: restarted
- daemon_reload: true
- listen: "start and enable systemd-networkd"
-
-- name: start and enable systemd-resolved
- systemd:
- name: systemd-resolved
- enabled: true
- state: started
- listen: "start and enable systemd-resolved"
diff --git a/roles/networkdresolved/tasks/main.yml b/roles/networkdresolved/tasks/main.yml
deleted file mode 100644
index 2918d11..0000000
--- a/roles/networkdresolved/tasks/main.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-- name: move /etc/network/interfaces away
- command:
- cmd: mv /etc/network/interfaces /etc/network/interfaces_orig
- creates: /etc/network/interfaces_orig
-
-- name: switch to systemd-networkd
- copy:
- src: all-eth.network
- dest: /etc/systemd/network/all-eth.network
- mode: 0644
- notify: "start and enable systemd-networkd"
-
-# - name: install static configuration for networkd
-# template:
-# src: 20-static.network.j2
-# dest: /etc/systemd/network/20-static.network
-# notify: "enable systemd-networkd"
-
-- name: enable local stub resolver
- file:
- src: /run/systemd/resolve/stub-resolv.conf
- dest: /etc/resolv.conf
- state: link
- follow: false
- force: true
- notify: "start and enable systemd-resolved"
diff --git a/roles/networkdresolved/templates/20-static.network.j2 b/roles/networkdresolved/templates/20-static.network.j2
deleted file mode 100644
index fbdc83b..0000000
--- a/roles/networkdresolved/templates/20-static.network.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-[Match]
-Name={{ if_lan }}
-
-[Network]
-Address={{ ipaddr }}
-Gateway={{ gateway }}
-DNS={{ dns }}
diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml
deleted file mode 100644
index be2e996..0000000
--- a/roles/nextcloud/defaults/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-db_nextcloud_pwd: "{{ lookup('password', '/tmp/db-nextcloud.pwd chars=ascii_letters,digits length=32') }}"
-nc_admin_pwd: "{{ lookup('password', '/tmp/nc-admin.pwd chars=ascii_letters,digits length=32') }}"
-nc_admin_pwd_file: "/root/nc-admin.pwd"
-www_root: "/var/www"
-nc_dir: "{{ www_root }}/nextcloud"
-data_dir: "/var/nc-data"
-allow_download: false
diff --git a/roles/nextcloud/files/krb5-nextcloud.conf b/roles/nextcloud/files/krb5-nextcloud.conf
deleted file mode 100644
index 89415e9..0000000
--- a/roles/nextcloud/files/krb5-nextcloud.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-
- AuthType GSSAPI
- AuthName "Login to NextCloud"
- GssapiAllowedMech krb5
- GssapiLocalName On
- GssapiCredStore keytab:/etc/krb5.keytab.http
- GssapiUseSessions On
- GssapiNegotiateOnce On
- GssapiBasicAuth On
- Require valid-user
-
diff --git a/roles/nextcloud/files/nextcloud.conf b/roles/nextcloud/files/nextcloud.conf
deleted file mode 100644
index 7c8baa6..0000000
--- a/roles/nextcloud/files/nextcloud.conf
+++ /dev/null
@@ -1,31 +0,0 @@
-Alias /nextcloud "/var/www/nextcloud"
-
-
- Require all granted
- Options FollowSymlinks MultiViews
- AllowOverride All
- Satisfy Any
-
-
- Dav off
-
-
- SetEnv HOME /var/www/nextcloud
- SetEnv HTTP_HOME /var/www/nextcloud
-
-
-
-
- RewriteEngine on
- RewriteRule ^\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
- RewriteRule ^\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
- RewriteRule ^\.well-known/webfinger /nextcloud/index.php/.well-known/webfinger [R=301,L]
- RewriteRule ^\.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo [R=301,L]
- RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav [R=301,L]
- RewriteRule ^\.well-known/caldav /nextcloud/remote.php/dav [R=301,L]
-
-
-
-
- Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
-
diff --git a/roles/nextcloud/files/nextcloudcron.service b/roles/nextcloud/files/nextcloudcron.service
deleted file mode 100644
index 79f01dc..0000000
--- a/roles/nextcloud/files/nextcloudcron.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Nextcloud cron.php job
-
-[Service]
-User=www-data
-ExecStart=/usr/bin/php -f /var/www/nextcloud/cron.php
diff --git a/roles/nextcloud/files/nextcloudcron.timer b/roles/nextcloud/files/nextcloudcron.timer
deleted file mode 100644
index eda82c9..0000000
--- a/roles/nextcloud/files/nextcloudcron.timer
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Run Nextcloud cron.php every 5 minutes
-
-[Timer]
-OnBootSec=5min
-OnUnitActiveSec=5min
-Unit=nextcloudcron.service
-
-[Install]
-WantedBy=timers.target
diff --git a/roles/nextcloud/handlers/main.yml b/roles/nextcloud/handlers/main.yml
deleted file mode 100644
index 2446778..0000000
--- a/roles/nextcloud/handlers/main.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-- name: restart apache2
- systemd:
- name: apache2
- state: restarted
- listen: "restart apache2"
-
-- name: restart php-fpm
- systemd:
- name: php{{ php_ver.stdout }}-fpm
- state: restarted
- listen: "restart php-fpm"
-
-- name: enable nextcloudcron.service and .timer
- systemd:
- name: nextcloudcron.timer
- state: started
- enabled: true
- listen: "enable nextcloudcron.timer"
diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml
deleted file mode 100644
index 565682e..0000000
--- a/roles/nextcloud/tasks/main.yml
+++ /dev/null
@@ -1,322 +0,0 @@
-## Install and configure nextcloud.
-
-- name: check if we are installing
- stat: path="{{ nc_dir }}"
- register: nextcloud
-
-- name: check for nextcloud archive
- stat:
- path: nextcloud.tar.bz2
- become: false
- delegate_to: localhost
- register: nc_archive
- when: not nextcloud.stat.exists
-
-- name: stop if nextcloud archive is unavailable
- fail:
- msg: >
- The nextcloud archive nextcloud.tar.bz2 is not available.
- Download the latest stable release from 'nextcloud.com',
- check the signature, rename it and copy it next to 'cloudbox.yml'.
- when: >
- not nextcloud.stat.exists and not nc_archive.stat.exists and
- not run_in_installer|default(false)|bool
-
-## We can start with the installation now:
-
-- name: install apache, firewalld, php- and db-packages
- apt:
- name:
- - apache2
- - firewalld
- - mariadb-server
- - python3-pymysql
- - php-apcu
- - php-bcmath
- - php-fpm
- - php-curl
- - php-gd
- - php-gmp
- - php-imagick
- - libmagickcore-6.q16-6-extra
- - php-intl
- - php-json
- - php-ldap
- - php-mbstring
- - php-mysql
- - php-xml
- - php-zip
- - unzip
- state: latest # noqa package-latest
-
-- name: disable apache modules
- apache2_module:
- state: absent
- name: "{{ item }}"
- with_items:
- - mpm_prefork
- - mpm_worker
- notify: "restart apache2"
-
-- name: enable apache modules
- apache2_module:
- name: "{{ item }}"
- with_items:
- - proxy_fcgi
- - mpm_event
- - rewrite
- - headers
- - ssl
- - http2
- notify: "restart apache2"
-
-- name: find php version # noqa risky-shell-pipe
- shell: ls /etc/php/ | sort | tail -1
- register: php_ver
- changed_when: false
-
-- name: enable php-fpm conf
- command: a2enconf php{{ php_ver.stdout }}-fpm
- args:
- creates: /etc/apache2/conf-enabled/php{{ php_ver.stdout }}-fpm.conf
- notify: "restart apache2"
-
-- name: tune php-fpm
- replace:
- dest: /etc/php/{{ php_ver.stdout }}/fpm/pool.d/www.conf
- regexp: "{{ item.regex }}"
- replace: "{{ item.replace }}"
- with_items:
- - regex: "^pm.max_children = .*$"
- replace: "pm.max_children = 10"
- - regex: "^pm.start_servers = .*$"
- replace: "pm.start_servers = 4"
- - regex: "^pm.min_spare_servers = .*$"
- replace: "pm.min_spare_servers = 2"
- - regex: "^pm.max_spare_servers = .*$"
- replace: "pm.max_spare_servers = 6"
- notify: "restart php-fpm"
-
-- name: increase php memory limit
- replace:
- dest: "/etc/php/{{ php_ver.stdout }}/fpm/php.ini"
- regexp: "^memory_limit = .*"
- replace: "memory_limit = 512M"
- notify: "restart apache2"
-
-- name: provide nextcloud site
- copy:
- src: nextcloud.conf
- dest: /etc/apache2/sites-available/nextcloud.conf
- mode: 0644
- notify: "restart apache2"
-
-- name: enable nextcloud site
- command: a2ensite nextcloud.conf
- args:
- creates: /etc/apache2/sites-enabled/nextcloud.conf
- notify: "restart apache2"
-
-- name: enable https
- shell: 'grep -q "VirtualHost .*:443" * || a2ensite default-ssl.conf'
- args:
- chdir: /etc/apache2/sites-enabled/
- creates: default-ssl.conf
- notify: "restart apache2"
- register: cmd_result
- changed_when: cmd_result.stdout != '' and cmd_result.stdout is not search('skipped')
-
-- name: make sure data directory exists
- file:
- path: "{{ data_dir }}"
- state: directory
- mode: 0770
- owner: www-data
- group: www-data
-
-## install nextcloud:
-- name: download nextcloud archive
- get_url:
- url: "{{ nc_download }}"
- dest: /tmp/nextcloud.tar.bz2
- checksum: "{{ nc_checksum }}"
- when: run_in_installer|default(false)|bool
-
-- name: unpack downloaded nextcloud archive
- unarchive:
- src: /tmp/nextcloud.tar.bz2
- dest: "{{ www_root }}"
- owner: www-data
- group: www-data
- remote_src: true
- when: not nextcloud.stat.exists and run_in_installer|default(false)|bool
-
-- name: unpack provided nextcloud archive
- unarchive:
- src: nextcloud.tar.bz2
- dest: "{{ www_root }}"
- owner: www-data
- group: www-data
- when: not nextcloud.stat.exists and not run_in_installer|default(false)|bool
-
-- name: start mariadb during installation
- command: /etc/init.d/mariadb start
- when: run_in_installer|default(false)|bool
-
-- name: create database with name 'nextcloud'
- mysql_db:
- login_unix_socket: /var/run/mysqld/mysqld.sock
- name: nextcloud
- state: present
- when: not nextcloud.stat.exists
-
-- name: create database user 'nextcloud'
- mysql_user:
- login_unix_socket: /var/run/mysqld/mysqld.sock
- name: nextcloud
- password: "{{ db_nextcloud_pwd }}"
- priv: 'nextcloud.*:ALL'
- state: present
- when: not nextcloud.stat.exists
-
-- name: initialize nextcloud
- command:
- cmd: >
- sudo -u www-data php ./occ maintenance:install
- --database "mysql"
- --database-name "nextcloud"
- --database-user "nextcloud"
- --database-pass "{{ db_nextcloud_pwd }}"
- --admin-user "nc-admin"
- --admin-pass "{{ nc_admin_pwd }}"
- --data-dir "{{ data_dir }}"
- args:
- chdir: "{{ nc_dir }}"
- no_log: true
- when: not nextcloud.stat.exists
-
-- name: dump nc-admin password
- shell: echo -n "{{ nc_admin_pwd }}" > "{{ nc_admin_pwd_file }}" ; chmod 0600 "{{ nc_admin_pwd_file }}"
- no_log: true
- when: not nextcloud.stat.exists
-
-- name: enable APCu memcache
- command: sudo -u www-data php ./occ config:system:set memcache.local --value='\OC\Memcache\APCu'
- args:
- chdir: "{{ nc_dir }}"
- warn: false
- when: not nextcloud.stat.exists
-
-- name: enable acpu for nextcloud updates
- lineinfile:
- path: /etc/php/{{ php_ver.stdout }}/mods-available/apcu.ini
- line: "apc.enable_cli=1"
-
-- name: allow access from LAN
- command: sudo -u www-data php ./occ config:system:set trusted_domains {{ item[0] }} --value='{{ item[1] }}'
- args:
- chdir: "{{ nc_dir }}"
- warn: false
- when: not nextcloud.stat.exists
- loop:
- - [1, '192.168.*.*']
- - [2, '10.*.*.*']
- - [3, '172.16.*.*']
-
-## nextcloudcron
-- name: provide nextcloudcron.service and .timer
- copy:
- src: "{{ item }}"
- dest: "/etc/systemd/system/{{ item }}"
- mode: 0644
- with_items:
- - nextcloudcron.service
- - nextcloudcron.timer
- notify: "enable nextcloudcron.timer"
-
-- name: add default NIC to public zone
- firewalld:
- interface: "{{ ansible_default_ipv4.interface }}"
- zone: public
- permanent: true
- immediate: true
- state: enabled
- when: not run_in_installer|default(false)|bool
-
-- name: add default NIC to public zone, offline
- command: "firewall-offline-cmd --add-interface={{ ansible_default_ipv4.interface }} --zone=public"
- when: run_in_installer|default(false)|bool
-
-- name: allow https in firewalld
- firewalld:
- zone: public
- service: https
- permanent: true
- immediate: true
- state: enabled
- when: not run_in_installer|default(false)|bool
-
-- name: allow https in firewalld, offline
- command: "firewall-offline-cmd --add-service=https"
- when: run_in_installer|default(false)|bool
-
-#################################################################
-## kerberox integration:
-
-- name: install libapache2-mod-auth-gssapi
- apt:
- name: libapache2-mod-auth-gssapi
- state: latest # noqa package-latest
- when: "'kerberize' in role_names"
- notify: "restart apache2"
-
-- name: copy keytab for www-data
- copy:
- src: /etc/krb5.keytab
- dest: /etc/krb5.keytab.http
- group: www-data
- mode: "0640"
- remote_src: true
- force: false
- when: "'kerberize' in role_names"
- notify: "restart apache2"
-
-- name: provide kerberos SSO config
- copy:
- src: krb5-nextcloud.conf
- dest: /etc/apache2/sites-available/krb5-nextcloud.conf
- mode: 0644
- when: "'kerberize' in role_names"
- notify: "restart apache2"
-
-- name: enable kerberos access to nextcloud site
- command: a2ensite krb5-nextcloud.conf
- args:
- creates: /etc/apache2/sites-enabled/krb5-nextcloud.conf
- notify: "restart apache2"
- when: "'kerberize' in role_names"
-
-- name: allow https in firewalld
- firewalld:
- zone: internal
- service: https
- permanent: true
- immediate: true
- state: enabled
- when: not run_in_installer|default(false)|bool and 'kerberize' in role_names
-
-- name: allow https in firewalld, offline
- command: "firewall-offline-cmd --add-service=https --zone=internal"
- when: run_in_installer|default(false)|bool and 'kerberize' in role_names
-
-- name: allow access from kerberized LAN
- command: sudo -u www-data php ./occ config:system:set trusted_domains 2 --value='{{ ansible_hostname }}.{{ ansible_domain }}'
- args:
- chdir: "{{ nc_dir }}"
- warn: false
- when: not nextcloud.stat.exists and 'kerberize' in role_names
-
-
-# sudo -u www-data php ./occ app:enable user_ldap
-# sudo -u www-data php ./occ app:install user_saml
-# sudo -u www-data php ./occ ldap
diff --git a/roles/nextcloudupgrade/handlers/main.yml b/roles/nextcloudupgrade/handlers/main.yml
deleted file mode 100644
index dfe1270..0000000
--- a/roles/nextcloudupgrade/handlers/main.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-## DB fixes (only on upgrade)
-- name: add missing indices, columns and convert filecache
- command: "{{ item }}"
- args:
- chdir: "{{ nc_dir }}"
- warn: false
- register: cmd_result
- changed_when: cmd_result.stdout is search("updated successfully")
- with_items:
- - "sudo -u www-data php ./occ db:add-missing-indices"
- - "sudo -u www-data php ./occ db:add-missing-columns"
- - "sudo -u www-data php ./occ -n db:convert-filecache-bigint"
- listen: update and fix data base
diff --git a/roles/nextcloudupgrade/tasks/main.yml b/roles/nextcloudupgrade/tasks/main.yml
deleted file mode 100644
index 7d6d0a5..0000000
--- a/roles/nextcloudupgrade/tasks/main.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: check/run upgrade
- command: sudo -u www-data php updater.phar --no-interaction
- args:
- chdir: "{{ nc_dir }}/updater"
- warn: false
- register: upgrade_result
- changed_when: upgrade_result.stdout is not search('Nothing to do.')
- notify: update and fix data base
-
-- name: update apps
- command: "sudo -u www-data php ./occ app:update --all"
- args:
- chdir: "{{ nc_dir }}"
- warn: false
- register: cmd_result
- changed_when: cmd_result.stdout | length > 0
-
-- name: install extra apps
- command: "sudo -u www-data php ./occ app:install {{ item }}"
- args:
- chdir: "{{ nc_dir }}"
- warn: false
- with_items: "{{ nc_apps }}"
- register: cmd_result
- changed_when: cmd_result.stdout is not search('already installed')
- failed_when: cmd_result.stdout is not search('already installed') and cmd_result.rc != 0
diff --git a/roles/nfsserver/defaults/main.yml b/roles/nfsserver/defaults/main.yml
deleted file mode 100644
index 4aea529..0000000
--- a/roles/nfsserver/defaults/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-export_root: /srv/nfs4
-lan_homes: /home/lan
-basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
-min_id: 10000
-min_id_sssd: 5000
-max_id_sssd: 20000
diff --git a/roles/nfsserver/handlers/main.yml b/roles/nfsserver/handlers/main.yml
deleted file mode 100644
index 224f948..0000000
--- a/roles/nfsserver/handlers/main.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-- name: bind mount exported dir
- mount:
- path: "{{ export_root }}/home/"
- src: "{{ lan_homes }}"
- fstype: none
- state: mounted
- opts: bind
- listen: "bind mount exported dirs"
-
-- name: restart nfs-kernel-server
- service: name=nfs-kernel-server state=restarted enabled=yes
- listen: "restart nfs-kernel-server"
-
-- name: restart rpc-svcgssd
- service: name=rpc-svcgssd state=restarted enabled=yes
- listen: "restart rpc-svcgssd"
-
-- name: restart sssd
- service: name=sssd state=restarted enabled=yes
- listen: "restart sssd"
-
-- name: restart dnsmasq
- service: name=dnsmasq state=restarted enabled=yes
- listen: "restart dnsmasq"
diff --git a/roles/nfsserver/tasks/main.yml b/roles/nfsserver/tasks/main.yml
deleted file mode 100644
index 65ad478..0000000
--- a/roles/nfsserver/tasks/main.yml
+++ /dev/null
@@ -1,94 +0,0 @@
-## Install and configure nfs-server
----
-- name: check if ansible domain is nonempty
- fail: msg="The machine's domain must not be empty."
- when: ansible_domain | length == 0
-
-- name: check if we are installing
- stat: path=/etc/exports
- register: exports
-
-- name: install nfs-kernel-server
- apt:
- name:
- - nfs-kernel-server
- state: latest # noqa package-latest # noqa package-latest
-
-- name: make sure the export paths exists
- file: path={{ export_root }}/home/ state=directory recurse=yes
-
-- name: make sure the lan homes exists
- file: path={{ lan_homes }} state=directory recurse=yes
- notify: "bind mount exported dirs"
-
-- name: configure exports
- blockinfile:
- dest: /etc/exports
- insertbefore: EOF
- block: |
- {{ export_root }} {{ ipaddr_lan | ipaddr('subnet') }}(sec=krb5p,rw,fsid=0,crossmnt,no_subtree_check)
- {{ export_root }}/home/ {{ ipaddr_lan | ipaddr('subnet') }}(sec=krb5p,rw,no_subtree_check)
- notify: "restart nfs-kernel-server"
-
-- name: "make 'nfs' an alias hostname resolvable from the LAN"
- replace:
- path: /etc/hosts
- regexp: "^({{ ipaddr_lan | ipaddr('address') }}\\s.+)$"
- replace: '\1 nfs'
- when: not exports.stat.exists
-
-- name: check if there is a local kadmin
- stat: path=/usr/sbin/kadmin.local
- register: kadmin
-
-- name: create machine principal
- command: kadmin.local -q "addprinc -randkey nfs/{{ ansible_hostname }}.{{ ansible_domain }}"
- when: kadmin.stat.exists and not exports.stat.exists
-
-- name: add principal to the keytab
- command: kadmin.local -q "ktadd nfs/{{ ansible_hostname }}.{{ ansible_domain }}"
- notify: "restart rpc-svcgssd"
- when: kadmin.stat.exists and not exports.stat.exists
-
-- name: install sssd-krb5
- apt:
- name:
- - sssd-krb5
- - sssd-ldap
- - sssd-tools ## sss_cache -U -G
- state: latest # noqa package-latest
- when: kadmin.stat.exists
-
-- name: provide identities from directory
- template:
- src: sssd.conf.j2
- dest: /etc/sssd/sssd.conf
- mode: 0600
- notify: restart sssd
- when: kadmin.stat.exists
-
-- name: copy home from /etc/skel for dummy user foo
- shell: cp -r /etc/skel {{ lan_homes }}/foo && chmod -R o-rwx {{ lan_homes }}/foo && chown -R {{ min_id }}:{{ min_id }} {{ lan_homes }}/foo
- args:
- creates: "{{ lan_homes }}/foo"
- when: foo_pwd is defined and foo_pwd | length > 0
-
-- name: check if our dnsmasq is used
- stat: path=/etc/dnsmasq.d/dnsmasq-dhcp
- register: dnsmasq
-
-- name: send domain to clients
- template:
- src: dhcp-send-domain.j2
- dest: /etc/dnsmasq.d/dhcp-send-domain
- mode: 0644
- notify: "restart dnsmasq"
- when: dnsmasq.stat.exists
-
-- name: allow nfs service in firewalld
- firewalld:
- zone: internal
- service: nfs
- permanent: true
- immediate: true
- state: enabled
diff --git a/roles/nfsserver/templates/dhcp-send-domain.j2 b/roles/nfsserver/templates/dhcp-send-domain.j2
deleted file mode 100644
index 6933a9e..0000000
--- a/roles/nfsserver/templates/dhcp-send-domain.j2
+++ /dev/null
@@ -1,2 +0,0 @@
-expand-hosts
-domain={{ ansible_domain }}
diff --git a/roles/nfsserver/templates/sssd.conf.j2 b/roles/nfsserver/templates/sssd.conf.j2
deleted file mode 100644
index 815ea54..0000000
--- a/roles/nfsserver/templates/sssd.conf.j2
+++ /dev/null
@@ -1,22 +0,0 @@
-[sssd]
-domains = LDAP
-config_file_version = 2
-
-[nss]
-filter_groups = root
-filter_users = root
-
-[pam]
-
-[domain/LDAP]
-id_provider = ldap
-ldap_uri = ldap://{{ ansible_hostname }}/
-ldap_search_base = {{ basedn }}
-
-auth_provider = krb5
-krb5_server = {{ ansible_hostname }}
-krb5_realm = {{ ansible_domain | upper }}
-cache_credentials = false
-
-min_id = {{ min_id_sssd }}
-max_id = {{ max_id_sssd }}
diff --git a/roles/prepare4clients/handlers/main.yml b/roles/prepare4clients/handlers/main.yml
deleted file mode 100644
index dc6f9ad..0000000
--- a/roles/prepare4clients/handlers/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: start git-repo
- systemd:
- daemon_reload: true
- name: git-repo
- state: started
- enabled: true
- listen: start git-repo
diff --git a/roles/prepare4clients/tasks/main.yml b/roles/prepare4clients/tasks/main.yml
deleted file mode 100644
index 9b1415c..0000000
--- a/roles/prepare4clients/tasks/main.yml
+++ /dev/null
@@ -1,241 +0,0 @@
-- name: make sure ansible is available
- apt:
- name: ansible
- state: latest # noqa package-latest
-
-- name: generate ssh key
- command: "su -l {{ ansible_user }} -c \"ssh-keygen -t rsa -f /home/{{ ansible_user }}/.ssh/id_rsa -P ''\""
- args:
- creates: "/home/{{ ansible_user }}/.ssh/id_rsa"
- warn: false
-
-- name: slurp public key
- slurp:
- src: "/home/{{ ansible_user }}/.ssh/id_rsa.pub"
- register: sshpubkey
-
-# The following seems to be necessary to get rid of a newline:
-- name: define variable
- set_fact:
- sshpubkey: "{{ sshpubkey['content'] | b64decode | replace('\n', '') }}"
-
-- name: enable backports in preseed file
- replace:
- dest: "{{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg"
- regexp: '^#(apt-setup-udeb.*)$'
- replace: '\1'
-
-- name: preseed client - add firmware-linux, ansible and git
- replace:
- dest: "{{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg"
- regexp: '^(d-i pkgsel/include string firmware-linux)$'
- replace: '#\1\nd-i pkgsel/include string firmware-linux ansible git'
-
-- name: insert start of managed block
- replace:
- dest: "{{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg"
- regexp: '^(### This command is run just before the install finishes:)'
- replace: '#\1\n# BEGIN ANSIBLE MANAGED BLOCK preseed/late_command'
-
-- name: insert end of managed block
- replace:
- dest: "{{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg"
- regexp: '^(## When installing.*)'
- replace: '# END ANSIBLE MANAGED BLOCK preseed/late_command\n#\1'
-
-- name: insert block
- blockinfile:
- dest: "{{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg"
- insertafter: "^### This command is run just before the install finishes:"
- block: |
- d-i preseed/late_command string \
- mkdir -p /target/home/ansible/.ssh && \
- echo "{{ sshpubkey }}" >> /target/home/ansible/.ssh/authorized_keys ; \
- in-target chown -R ansible:ansible /home/ansible/.ssh/ ; \
- in-target chmod -R og= /home/ansible/.ssh/ ; \
- [ -z "$playbook" ] || in-target ansible-pull --verbose --purge --extra-vars="run_in_installer=true" \
- -i localhost, --url=git://{{ ansible_hostname }}/.git $playbook
- marker: "# {mark} ANSIBLE MANAGED BLOCK preseed/late_command"
-
-- name: add pxe boot entries to di-netboot-assistant
- blockinfile:
- dest: /etc/di-netboot-assistant/pxelinux.HEAD
- insertbefore: EOF
- block: |
- TIMEOUT 100
- # Use a temporary package cache during installation, install etckeeper.
- LABEL tmp pkg cache
- MENU LABEL Debian stable (amd64) + temporary package cache
- kernel ::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux
- append initrd=::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz mirror/http/proxy?=http://{{ ansible_hostname }}:3142/ pkgsel/include=etckeeper preseed/late_command="rm -fv /target/etc/apt/apt.conf" ---
-
- LABEL kiosk
- MENU LABEL Debian {{ di_version }} (amd64) + preseed + kiosk.yml
- kernel ::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux
- append initrd=::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz hostname=kiosk auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=kiosk.yml ---
-
- LABEL cloudbox
- MENU LABEL Debian {{ di_version }} (amd64) + preseed + cloudbox.yml
- kernel ::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux
- append initrd=::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz hostname=cloudbox auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=cloudbox.yml ---
-
- LABEL edubox
- MENU LABEL Debian {{ di_version }} (amd64) + preseed + edubox.yml
- kernel ::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux
- append initrd=::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz hostname=edubox auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=edubox.yml ---
-
- #LABEL daily
- #MENU LABEL Debian daily (amd64) + preseed + kiosk.yml
- #kernel ::/d-i/n-a/daily/amd64/linux
- #append initrd=::/d-i/n-a/daily/amd64/initrd.gz auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=kiosk.yml ---
- marker: "# {mark} ANSIBLE MANAGED BLOCK default"
- notify: "rebuild di-netboot-assistant menu"
-
-- name: add efi boot entries to di-netboot-assistant
- blockinfile:
- dest: /etc/di-netboot-assistant/grub.cfg.HEAD
- insertbefore: EOF
- block: |
- # Use a temporary package cache during installation, install etckeeper.
- menuentry 'Debian stable (amd64) + temporary package cache' {
- linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
- mirror/http/proxy?=http://{{ ansible_hostname }}:3142/ pkgsel/include=etckeeper \
- preseed/late_command="rm -fv /target/etc/apt/apt.conf" ---
- initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
- }
-
- menuentry 'Debian {{ di_version }} (amd64) + preseed + kiosk.yml' {
- linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
- hostname=kiosk auto=true priority=critical \
- url=tftp://{{ ansible_hostname }} playbook=kiosk.yml ---
- initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
- }
-
- menuentry 'Debian {{ di_version }} (amd64) + preseed + cloudbox.yml' {
- linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
- hostname=cloudbox auto=true priority=critical \
- url=tftp://{{ ansible_hostname }} playbook=cloudbox.yml ---
- initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
- }
-
- menuentry 'Debian {{ di_version }} (amd64) + preseed + edubox.yml' {
- linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
- hostname=edubox auto=true priority=critical \
- url=tftp://{{ ansible_hostname }} playbook=edubox.yml ---
- initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
- }
-
- #menuentry 'Debian daily (amd64) + preseed + kiosk.yml' {
- # linux /d-i/n-a/daily/amd64/linux auto=true priority=critical \
- # url=tftp://{{ ansible_hostname }} playbook=kiosk.yml ---
- # initrd /d-i/n-a/daily/amd64/initrd.gz
- #}
- marker: "# {mark} ANSIBLE MANAGED BLOCK default"
- notify: "rebuild di-netboot-assistant menu"
-
-######## kerberox-client #######
-
-- name: check if we operate on kerberox
- stat: path=/usr/sbin/krb5kdc
- register: krb5kdc
-
-- name: add kerberox-client auto pxe boot entry to di-netboot-assistant
- blockinfile:
- dest: /etc/di-netboot-assistant/pxelinux.HEAD
- insertbefore: EOF
- block: |
- LABEL autoinstall
- MENU LABEL Debian {{ di_version }} (amd64) + preseed + kerberox-client.yml
- kernel ::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux
- append initrd=::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=kerberox-client.yml ---
- marker: "# {mark} ANSIBLE MANAGED BLOCK kerberox-client"
- notify: "rebuild di-netboot-assistant menu"
- when: krb5kdc.stat.exists
-
-- name: add kerberox-client auto efi boot entry to di-netboot-assistant
- blockinfile:
- dest: /etc/di-netboot-assistant/grub.cfg.HEAD
- insertbefore: EOF
- block: |
- menuentry 'Debian {{ di_version }} (amd64) + preseed + kerberox-client.yml' {
- regexp --set=1:oct4 --set=2:oct5 --set=3:oct6 "\:([[:xdigit:]]+)\:([[:xdigit:]]+)\:([[:xdigit:]]+)\$" $net_default_mac
- linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
- hostname=${oct4}${oct5}${oct6} domain={{ ansible_domain }} \
- auto=true priority=critical url=tftp://{{ ansible_hostname }} playbook=kerberox-client.yml ---
- initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
- }
- marker: "# {mark} ANSIBLE MANAGED BLOCK kerberox-client"
- notify: "rebuild di-netboot-assistant menu"
- when: krb5kdc.stat.exists
-
-######## sambox-client #######
-
-- name: check if we operate on sambox
- stat: path=/etc/samba/smb.conf
- register: samba
-
-- name: add sambox-client auto pxe boot entry to di-netboot-assistant
- blockinfile:
- dest: /etc/di-netboot-assistant/pxelinux.HEAD
- insertbefore: EOF
- block: |
- LABEL autoinstall
- MENU LABEL Debian {{ di_version }} (amd64) + preseed + sambox-client.yml
- kernel ::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux
- append initrd=::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz auto=true priority=critical domain={{ ansible_domain }} url=tftp://{{ ansible_hostname }} playbook=sambox-client.yml ---
- marker: "# {mark} ANSIBLE MANAGED BLOCK sambox-client"
- notify: "rebuild di-netboot-assistant menu"
- when: samba.stat.exists
-
-- name: add sambox-client auto efi boot entry to di-netboot-assistant
- blockinfile:
- dest: /etc/di-netboot-assistant/grub.cfg.HEAD
- insertbefore: EOF
- block: |
- menuentry 'Debian {{ di_version }} (amd64) + preseed + sambox-client.yml' {
- regexp --set=1:oct4 --set=2:oct5 --set=3:oct6 "\:([[:xdigit:]]+)\:([[:xdigit:]]+)\:([[:xdigit:]]+)\$" $net_default_mac
- linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux \
- auto=true priority=critical hostname=${oct4}${oct5}${oct6} url=tftp://{{ ansible_hostname }} \
- playbook=sambox-client.yml ---
- initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
- }
-
- menuentry 'Debian daily (amd64) + preseed + sambox-client.yml' {
- regexp --set=1:oct4 --set=2:oct5 --set=3:oct6 "\:([[:xdigit:]]+)\:([[:xdigit:]]+)\:([[:xdigit:]]+)\$" $net_default_mac
- linux /d-i/n-a/daily/amd64/linux auto=true priority=critical hostname=${oct4}${oct5}${oct6} \
- url=tftp://{{ ansible_hostname }} playbook=sambox-client.yml ---
- initrd /d-i/n-a/daily/amd64/initrd.gz
- }
- marker: "# {mark} ANSIBLE MANAGED BLOCK sambox-client"
- notify: "rebuild di-netboot-assistant menu"
- when: samba.stat.exists
-
-######################
-
-- name: provide git repo if not available already # noqa git-latest
- git:
- repo: 'https://salsa.debian.org/andi/debian-lan-ansible.git'
- dest: "{{ repo_dir }}"
- update: false
- become_user: "{{ ansible_user }}"
- when: not run_in_installer|default(false)|bool
-
-- name: start git-repo
- template:
- src: git-repo.j2
- dest: "/etc/systemd/system/git-repo.service"
- mode: 0644
- notify: start git-repo
- when: not run_in_installer|default(false)|bool
-
-######################
-
-- name: add clients to inventory
- blockinfile:
- dest: /etc/ansible/hosts
- create: true
- mode: 0644
- block: |
- [kerberoxclient]
- {{ in_inventory }}
- when: krb5kdc.stat.exists or samba.stat.exists
diff --git a/roles/prepare4clients/templates/git-repo.j2 b/roles/prepare4clients/templates/git-repo.j2
deleted file mode 100644
index 8ac7cee..0000000
--- a/roles/prepare4clients/templates/git-repo.j2
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Start Git Daemon
-
-[Service]
-ExecStart=/usr/bin/git daemon --reuseaddr --export-all --base-path={{ repo_dir }}
-
-Restart=always
-RestartSec=500ms
-
-SyslogIdentifier=git-daemon
-DynamicUser=yes
-
-[Install]
-WantedBy=multi-user.target
diff --git a/roles/sambaldap/defaults/main.yml b/roles/sambaldap/defaults/main.yml
deleted file mode 100644
index 575579c..0000000
--- a/roles/sambaldap/defaults/main.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
-ldap_server: ldap
-min_id_sssd: 5000
-max_id_sssd: 20000
diff --git a/roles/sambaldap/handlers/main.yml b/roles/sambaldap/handlers/main.yml
deleted file mode 100644
index aef70e4..0000000
--- a/roles/sambaldap/handlers/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: restart sssd
- service: name=sssd state=restarted enabled=yes
- listen: "restart sssd"
-
-- name: restart smbd
- service: name=smbd state=restarted enabled=yes
- listen: "restart smbd"
diff --git a/roles/sambaldap/meta/main.yml b/roles/sambaldap/meta/main.yml
deleted file mode 100644
index 36ca9ba..0000000
--- a/roles/sambaldap/meta/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-dependencies: # noqa meta-no-info
- - role: ldap
diff --git a/roles/sambaldap/tasks/main.yml b/roles/sambaldap/tasks/main.yml
deleted file mode 100644
index 846bf69..0000000
--- a/roles/sambaldap/tasks/main.yml
+++ /dev/null
@@ -1,133 +0,0 @@
-## Install and configure samba-ldap.
----
-- name: check if samba is already there
- stat: path=/etc/ldap/schema/samba.ldif
- register: samba_ldap
-
-- name: install samba and provide samba schema
- apt:
- name:
- - samba
- - sssd-ldap
- state: latest # noqa package-latest
-
-- name: provide identities from LDAP
- template:
- src: sssd.conf.j2
- dest: /etc/sssd/sssd.conf
- mode: 0600
- notify: restart sssd
-
-- name: prepare samba schema
- command: cp /usr/share/doc/samba/examples/LDAP/samba.ldif /etc/ldap/schema/
- args:
- creates: /etc/ldap/schema/samba.ldif
-
-- name: activate samba.ldif schema
- command: ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/samba.ldif
- when: not samba_ldap.stat.exists
-
-- name: add indexes to LDAP
- ldap_attrs:
- dn: "olcDatabase={1}mdb,cn=config"
- attributes:
- olcDbIndex:
- - sambaSID eq
- - sambaPrimaryGroupSID eq
- - sambaGroupType eq
- - sambaSIDList eq
- - sambaDomainName eq
- state: present
-
-- name: modify ACLs to account for Samba
- ldap_attrs:
- dn: "olcDatabase={1}mdb,cn=config"
- attributes:
- olcAccess:
- - >-
- to attrs=userPassword
- by self write
- by anonymous auth
- by * none
- - >-
- to attrs=shadowLastChange
- by self write
- by * read
- - >-
- to attrs=sambaNTPassword
- by dn.exact=cn=admin,{{ basedn }} write
- by self write
- by * none
- - >-
- to * by * read
- ordered: true
- state: exact
-
-- name: configure smb ldap backend
- blockinfile:
- dest: /etc/samba/smb.conf
- insertafter: '^\s*server role ='
- block: |
- ####### LDAP Settings #######
- passdb backend = ldapsam:ldapi:///
- ldap suffix = {{ basedn }}
- ldap user suffix = ou=people
- ldap group suffix = ou=groups
- ldap machine suffix = ou=computers
- ldap idmap suffix = ou=idmap
- ldap admin dn = cn=admin,{{ basedn }}
- ldap ssl = no
- ldap passwd sync = yes
- notify: restart smbd
-
-- name: make smb homes writable
- replace:
- path: /etc/samba/smb.conf
- regexp: '^(\s*read only =) yes$'
- replace: '\1 no'
- after: '\[homes\]'
- before: '\[.+\]'
- notify: restart smbd
-
-- name: modify samba default create mask
- replace:
- path: /etc/samba/smb.conf
- regexp: '^(\s*create mask =) 0700'
- replace: '\1 0600'
- after: '\[homes\]'
- before: '\[.+\]'
- notify: restart smbd
-
-- name: slurp admin password for samba setup
- slurp:
- src: "{{ ldap_admin_pwd_file }}"
- register: ldap_admin_pwd
- no_log: true
- when: not samba_ldap.stat.exists
-
-- name: make samba admin password available to smbd
- command: smbpasswd -w "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
- no_log: true
- notify: restart smbd
- when: not samba_ldap.stat.exists
-
-- name: flush all handlers
- meta: flush_handlers
-
-- name: add samba attributes to dummy user foo
- command:
- cmd: smbpasswd -s -a foo
- stdin: "{{ foo_pwd }}\n{{ foo_pwd }}"
- when: foo_pwd is defined and foo_pwd | length > 0
-
-########################
-
-- name: allow services in firewalld
- firewalld:
- zone: internal
- service: "{{ item }}"
- permanent: true
- immediate: true
- state: enabled
- with_items:
- - samba
diff --git a/roles/sambaldap/templates/sssd.conf.j2 b/roles/sambaldap/templates/sssd.conf.j2
deleted file mode 100644
index 6e6ac14..0000000
--- a/roles/sambaldap/templates/sssd.conf.j2
+++ /dev/null
@@ -1,23 +0,0 @@
-[sssd]
-domains = LDAP
-config_file_version = 2
-
-[nss]
-filter_groups = root
-filter_users = root
-
-[pam]
-
-[domain/LDAP]
-id_provider = ldap
-ldap_uri = ldap://{{ ldap_server }}/
-ldap_search_base = {{ basedn }}
-
-auth_provider = ldap
-cache_credentials = true
-
-min_id = {{ min_id_sssd }}
-max_id = {{ max_id_sssd }}
-
-## remove this after providing propper certificates:
-ldap_tls_reqcert = allow
diff --git a/roles/shorewall2if/handlers/main.yml b/roles/shorewall2if/handlers/main.yml
deleted file mode 100644
index 7d41138..0000000
--- a/roles/shorewall2if/handlers/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: restart networking
- systemd: name=networking state=restarted enabled=yes
- listen: restart networking
-
-- name: restart shorewall
- systemd: name=shorewall state=restarted enabled=yes
- listen: restart shorewall
diff --git a/roles/shorewall2if/tasks/main.yml b/roles/shorewall2if/tasks/main.yml
deleted file mode 100644
index 0974a2e..0000000
--- a/roles/shorewall2if/tasks/main.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-- name: add if_lan with static address
- template:
- src: interfaces-static.j2
- dest: /etc/network/interfaces.d/static
- mode: 0644
- notify: restart networking
-
-- name: install shorewall packages
- apt: name=shorewall state=latest # noqa package-latest
-
-- name: copy shorewall configuration
- command: cp {{ item }} /etc/shorewall/
- args:
- chdir: /usr/share/doc/shorewall/examples/two-interfaces/
- creates: "/etc/shorewall/{{ item }}"
- with_items:
- - interfaces
- - snat
- - policy
- - rules
- - stoppedrules
- - zones
- notify: restart shorewall
-
-- name: find files in /etc/shorewall/
- find:
- paths: /etc/shorewall/
- use_regex: true
- pattern: '.+[^~]$'
- contains: '.*(eth0|eth1).*'
- register: find_result
- notify: restart shorewall
-
-- name: fix WAN interface name in shorewall configuration
- replace:
- dest: "{{ item.path }}"
- regexp: 'eth0'
- replace: "{{ if_wan }}"
- backup: true
- with_items: "{{ find_result.files }}"
- notify: restart shorewall
-
-- name: fix LAN interface name in shorewall configuration
- replace:
- dest: "{{ item.path }}"
- regexp: 'eth1'
- replace: "{{ if_lan }}"
- backup: true
- with_items: "{{ find_result.files }}"
- notify: restart shorewall
-
-- name: configure forwarding in shorewall.conf
- replace:
- dest: /etc/shorewall/shorewall.conf
- regexp: 'IP_FORWARDING=Keep'
- replace: 'IP_FORWARDING=Yes'
- backup: true
- notify: restart shorewall
-
-- name: configure shorewall policy
- replace:
- dest: /etc/shorewall/policy
- regexp: 'loc(\s+)net(\s+)ACCEPT'
- replace: 'loc\1all\2ACCEPT\n$FW\1all\2ACCEPT'
- backup: true
- notify: restart shorewall
-
-- name: configure shorewall rules
- replace:
- dest: /etc/shorewall/rules
- regexp: '(SSH\(ACCEPT\)\s+)loc(\s+\$FW)'
- replace: '\1all\2'
- backup: true
- notify: restart shorewall
diff --git a/roles/shorewall2if/templates/interfaces-static.j2 b/roles/shorewall2if/templates/interfaces-static.j2
deleted file mode 100644
index 9724fa4..0000000
--- a/roles/shorewall2if/templates/interfaces-static.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-auto {{ if_lan }}
-allow-hotplug {{ if_lan }}
-iface {{ if_lan }} inet static
- address {{ ipaddr_lan }}
diff --git a/roles/smbsshfsclient/defaults/main.yml b/roles/smbsshfsclient/defaults/main.yml
deleted file mode 100644
index d2c6c70..0000000
--- a/roles/smbsshfsclient/defaults/main.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
-ldap_server: ldap
-home_server: homes
-min_id_sssd: 5000
-max_id_sssd: 20000
diff --git a/roles/smbsshfsclient/handlers/main.yml b/roles/smbsshfsclient/handlers/main.yml
deleted file mode 100644
index d54b258..0000000
--- a/roles/smbsshfsclient/handlers/main.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-- name: restart sssd
- service: name=sssd state=restarted enabled=yes
- listen: "restart sssd"
-
-- name: reload systemd
- systemd:
- daemon_reload: true
- listen: "reload systemd"
diff --git a/roles/smbsshfsclient/tasks/main.yml b/roles/smbsshfsclient/tasks/main.yml
deleted file mode 100644
index 922c34d..0000000
--- a/roles/smbsshfsclient/tasks/main.yml
+++ /dev/null
@@ -1,77 +0,0 @@
----
-- name: install needed packages
- apt:
- name:
- - sssd-ldap
- - libpam-mount
- - cifs-utils
- - sshfs
- - hxtools
- state: latest # noqa package-latest
-
-- name: add URI to ldap.conf
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "URI ldap://ldap/"
- insertafter: "#URI.*"
-
-- name: add BASE to ldap.conf
- lineinfile:
- dest: /etc/ldap/ldap.conf
- line: "BASE {{ basedn }}"
- insertafter: "#BASE.*"
-
-- name: enable pam_umask
- lineinfile:
- dest: /etc/pam.d/common-session
- line: "session optional pam_umask.so usergroups"
-
-- name: provide identities from directory
- template:
- src: sssd.conf.j2
- dest: /etc/sssd/sssd.conf
- mode: 0600
- notify: restart sssd
-
-- name: configure pam_mount # interesting options: posix,mfsymlinks,nomapposix,noperm
- blockinfile:
- dest: /etc/security/pam_mount.conf.xml
- block: |
-
- rootansibleDebian-gdm
- insertafter: ""
-
-- name: make sure umount is not blocked
- replace:
- path: /etc/security/pam_mount.conf.xml
- regexp: ''
-
-- name: make sure .ssh exists
- file:
- path: /root/.ssh
- state: directory
- mode: '0700'
-
-- name: fetch homes server host key for sshfs
- shell:
- cmd: ssh-keyscan -H {{ home_server }} >> /root/.ssh/known_hosts
- creates: /root/.ssh/known_hosts
-
-## gnome-keyring fails with sshfs:
-- name: disable gnome-keyring-daemon
- command:
- cmd: dpkg-divert --divert /usr/bin/gnome-keyring-daemon.distrib --rename /usr/bin/gnome-keyring-daemon
- creates: /usr/bin/gnome-keyring-daemon.distrib
diff --git a/roles/smbsshfsclient/templates/sssd.conf.j2 b/roles/smbsshfsclient/templates/sssd.conf.j2
deleted file mode 100644
index f39b856..0000000
--- a/roles/smbsshfsclient/templates/sssd.conf.j2
+++ /dev/null
@@ -1,22 +0,0 @@
-[sssd]
-domains = LDAP
-config_file_version = 2
-
-[nss]
-filter_groups = root
-filter_users = root
-
-[pam]
-
-[domain/LDAP]
-id_provider = ldap
-ldap_uri = ldap://{{ ldap_server }}/
-ldap_search_base = {{ basedn }}
-
-auth_provider = ldap
-cache_credentials = true
-
-min_id = {{ min_id_sssd }}
-max_id = {{ max_id_sssd }}
-
-ldap_tls_reqcert = allow
diff --git a/roles/transparentsquid/files/store_id_regex.conf b/roles/transparentsquid/files/store_id_regex.conf
deleted file mode 100644
index 3d88f21..0000000
--- a/roles/transparentsquid/files/store_id_regex.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-^http:\/\/.+\/(.+\.deb) http://debian.mirrors.squid.internal/Archive-http/$1
-^http:\/\/.+\/(.+\.udeb) http://debian.mirrors.squid.internal/Archive-http/$1
diff --git a/roles/transparentsquid/handlers/main.yml b/roles/transparentsquid/handlers/main.yml
deleted file mode 100644
index c103a79..0000000
--- a/roles/transparentsquid/handlers/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-- name: restart squid
- service: name=squid state=restarted enabled=yes
- listen: "restart squid"
diff --git a/roles/transparentsquid/tasks/main.yml b/roles/transparentsquid/tasks/main.yml
deleted file mode 100644
index 63f1199..0000000
--- a/roles/transparentsquid/tasks/main.yml
+++ /dev/null
@@ -1,63 +0,0 @@
-- name: install squid package
- apt:
- name: squid
- state: latest # noqa package-latest
-
-- name: configure squid extra lines
- lineinfile:
- dest: /etc/squid/squid.conf
- line: "{{ item.line }}"
- insertafter: "{{ item.insertafter }}"
- with_items:
- - line: "http_access allow localnet"
- insertafter: "#http_access allow localnet"
- - line: "http_port 3129 intercept"
- insertafter: "http_port 3128"
- - line: "maximum_object_size_in_memory 10240 KB"
- insertafter: "# maximum_object_size_in_memory"
- - line: "maximum_object_size 512 MB"
- insertafter: "# maximum_object_size"
- - line: "cache_dir aufs /var/spool/squid 20000 16 256"
- insertafter: "#cache_dir ufs /var/spool/squid"
- notify: "restart squid"
-
-- name: configure squid store IDs
- blockinfile:
- dest: /etc/squid/squid.conf
- insertbefore: "TAG: store_miss"
- block: |
- store_id_program /usr/lib/squid/storeid_file_rewrite /etc/squid/store_id_regex.conf
- marker: "# {mark} ANSIBLE MANAGED BLOCK store_id"
- notify: "restart squid"
-
-- name: provide store_id_regex.conf
- copy:
- src: store_id_regex.conf
- dest: /etc/squid/store_id_regex.conf
- mode: 0644
- notify: "restart squid"
-
-- name: configure squid as package cache
- blockinfile:
- dest: /etc/squid/squid.conf
- insertbefore: "# Add any of your own refresh_pattern entries above these."
- block: |
- # refresh pattern for debs and udebs
- refresh_pattern deb$ 129600 100% 129600
- refresh_pattern udeb$ 129600 100% 129600
- refresh_pattern tar.gz$ 129600 100% 129600
- refresh_pattern tar.xz$ 129600 100% 129600
- refresh_pattern tar.bz2$ 129600 100% 129600
- # always refresh Packages and Release files
- refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
- refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
- refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
- refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0
- marker: "# {mark} ANSIBLE MANAGED BLOCK refresh_pattern"
- notify: "restart squid"
-
-- name: redirect www traffic in shorewall
- lineinfile:
- dest: /etc/shorewall/rules
- line: "REDIRECT loc 3129 tcp www"
- notify: "restart shorewall"
diff --git a/roles/webserver/tasks/main.yml b/roles/webserver/tasks/main.yml
deleted file mode 100644
index f6b46a8..0000000
--- a/roles/webserver/tasks/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-- name: install some packages
- apt: name={{ item }} state=latest # noqa package-latest
- with_items:
- - unattended-upgrades
- - screen
- - python-certbot-apache
diff --git a/sambox-client.yml b/sambox-client.yml
deleted file mode 100644
index 5588c82..0000000
--- a/sambox-client.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-# This playbook deploys a client for the kerberox LAN.
-
-- name: apply configuration to the machines
- hosts: all
- remote_user: ansible
- become: true
- vars:
- extra_pkgs:
- - webext-privacy-badger
- - webext-ublock-origin
- extra_pkgs_bpo: [] # [ libreoffice ]
- ansible_python_interpreter: "/usr/bin/python3"
-
- roles:
- - up2date_debian
- - smbsshfsclient
- ## Choose either gnome or KDE:
- # - gnome
- # - kde
diff --git a/sambox.yml b/sambox.yml
deleted file mode 100644
index 6bf8c04..0000000
--- a/sambox.yml
+++ /dev/null
@@ -1,56 +0,0 @@
----
-## This playbook deploys the sambox server. Add 'hostname=XXX' and 'domain=YYY'
-## to the installer boot parameters to set hostname and domain.
-##
-
-- name: apply configuration to the sambox server
- hosts: all
- remote_user: ansible
- become: true
-
- vars:
- ## This interface provides the default route:
- if_wan: "{{ ansible_default_ipv4.interface }}"
-
- ## Use the first remaining interface for the LAN:
- if_lan: "{{ ansible_interfaces | difference([if_wan, 'lo']) | first }}"
-
- ## LAN IP address range:
- ipaddr_lan: 192.168.0.10/24
- ipaddr_lan_threeoct: "{{ ipaddr_lan.split('.')[0:3] | join('.') }}"
- ipaddr_lan_ptr: "{{ (ipaddr_lan | ipaddr('revdns')).split('.')[1:] | join('.') }}"
- ipaddr_lan_ptr_threeoct: "{{ ipaddr_lan_ptr.split('.')[0:3] | join('.') }}"
- dhcp_start: 192.168.0.50
- dhcp_stop: 192.168.0.150
- in_inventory: 192.168.0.[50:150]
-
- di_dist: "{{ ansible_distribution_release }}"
- di_version: "{{ ansible_distribution_major_version }}"
- di_pkg: "debian-installer-{{ di_version }}-netboot-amd64"
-
- ansible_user: ansible
- repo_dir: "/home/{{ ansible_user }}/debian-lan"
- ansible_python_interpreter: "/usr/bin/python3" ## needed for firewalld module
-
- vars_prompt:
- - name: "foo_pwd"
- prompt:
- In case you would like to prepare a test user 'foo' and have
- not done so yet, provide foo's password here. Leave empty to
- just continue
- private: true
-
- pre_tasks:
- - name: validate if interfaces are available
- fail:
- msg: "Interfaces {{ ansible_interfaces }} found. WAN: '{{ if_wan }}', LAN: '{{ if_lan }}'. Two NICs needed."
- when: (if_lan not in ansible_interfaces) or (if_wan not in ansible_interfaces) or (if_lan == if_wan)
-
- roles:
- - up2date_debian
- - firewalld2if
- - netbootinstaller
- - dnsdhcptftp
- - aptcacher
- - sambaldap
- - prepare4clients