The collection ufrmath.computer_labs
is used to deploy and customize computer labs of the Mathematics Department of Sorbonne University.
- Detailed administration and deployment guide
- User documentation for teachers and students (in French)
- Automatic documentation of the collection with roles parameters.
- Each role contains a
README.md
with a detailed description, synopsis and an example.
- ansible 4.x (corresponding to ansible-core 2.11) or newer
- sshpass
- netaddr
- jmespath
- antsibull-docs (only required to generate the documentation)
To install the ufrmath.computer_labs
collection:
ansible-galaxy collection install git+https://github.com/guillod/computer_labs
Optionally, to generate the detailed documentation of the collection, run the following command in an empty directory writable only by the owner:
antsibull-docs sphinx-init --use-current --squash-hierarchy --dest-dir . \
--title "Ansible roles to deploy computers' lab" --project "UFRMath - Computers lab" --copyright "Julien Guillod" \
--sphinx-theme sphinx_rtd_theme ufrmath.computer_labs
then, generate the documentation using the generated script build.sh
: the documentation ends up in build/html
.
A netboot server is needed to perform automatic installation over the network. To this end, one possibility is to use the playbook server-netboot.yml
which execute the roles server_netboot
.
A custom apt repository is needed to install some additional software. To this end, one possibility is to use the playbook server-repository.yml
which executes the roles:
server_repository
to custom the server and install aptly;add_deb
to download and add packages to the repository.
In addition, if proprietary software need to be installed (like Mathematica, Maple or MATLAB), follow this documentation to generate the corresponding Debian packages and add them to the server.
- Configure Ansible to have persistent cache using
fact_caching
andfact_caching_timeout=0
; - Define the Ansible hosts file and optionally
groups_vars
(for exampleproxy_env
if a proxy is needed); - Add public RSA key
id_key.pub
in thefiles
directory; - Use the netboot server to automatically install Ubuntu 22.04 Desktop with
openssh-server
and with main useradmin
; - Launch the playbook
setup-computers.yml
which executes the roles:setup_custom
to gather facts, setup ssh key, add nopasswd to sudo, modify hostname, correct machine-id, setup netplan, and customize the computers (adding proxy, theme, custom repository,...);setup_guest
to add guest user in GDM;patch_systemd
to patch systemd to allow numerical login;setup_nfs_ldap
to LDAP authentication and NFS for home directories;setup_bios
to configure BIOS settings;setup_printer
to add printers;
- Generate Veyon configuration
Veyon.conf
and keysveyon_private.key
,veyon_public.key
and put them in thefiles/
directory; - Launch the playbook
install-software.yml
which executes the roles:install_apt
to install software through apt;install_lutes_rdp
to configure the RDP server provided by Sorbonne University.install_pip
to install Python packages from pip in/usr/local
;install_veyon
to install and configure Veyon.
- To wake on LAN the computers using MAC address stored in Ansible cache use the playbook
wol.yml
which runs the rolewol
. - To shut down computers, launch the playbook
shutdown.yml
. - To generate an inventory of the computers as CS, use the playbook
inventory.yml
which runs the roleinventory
. - To list power-on computers and logged users, use the playbook
ping.yml
which runs the rolewol
. - To upgrade all deb packages, use the playbook
update-apt.yml
which runs the roleupdate_apt
. - To upgrade firmware through fwupd, use the playbook
update-firmware.yml
which runs the roleupdate_firmware
. - To make some cleanup, launch the playbook
cleanup.yml
.
For comments, issues, bug-reports and requests, please use the issue tracker of the current repository. Otherwise the principal author can be reached at:
Julien Guillod
julien.guillod CHEZ sorbonne-universite.fr
https://guillod.org/
Department of Mathematics
Sorbonne University
France