1
0
mirror of https://github.com/gjkcz/ansible-void.git synced 2024-12-26 12:36:39 +01:00
ansible-void/readme.md

50 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2023-04-29 21:03:43 +02:00
Ansible files for managing classroom machines at GJK.
There are two classrooms, POV and POM. All machines are running [Void Linux](https://voidlinux.org/) with [Gnome](https://www.gnome.org/) in dual-boot with Windows.
GDM configuration can be found at <https://help.gnome.org/admin/system-admin-guide/stable/index.html.en>.
## New client installation
2024-05-29 15:12:47 +02:00
There are several differences in the hardware. System installation is usually done in EFI, ~though MBR still exists on older machines in POV~.
2023-04-29 21:03:43 +02:00
- Install Void
2023-05-26 19:36:58 +02:00
- Update `xbps`: `xbps-install -Su xbps`
- Install `python3` and `avahi`: `xbps-install python3 avahi`
2023-11-01 15:42:59 +01:00
- Enable `avahi` service: `ln -s /etc/sv/avai-deamon/ /var/service/`
- Enable `sshd` service: `ln -s /etc/sv/sshd/ /var/service`
2023-04-29 21:03:43 +02:00
- Import your SSH key to `/root/.ssh/authorized_keys`
2023-11-01 15:42:59 +01:00
Void has `prohibit-password` for root in the default `sshd` configuration. Post-installation setup can be automated using a script or USB keyboard injector.
2023-04-29 21:03:43 +02:00
## Running a playbook
2023-06-08 15:14:46 +02:00
Here are some examples for running a playbook.
2023-04-29 21:03:43 +02:00
```
ansible-playbook setup.yaml
ansible-playbook -l teachers setup.yaml
2023-06-08 15:14:46 +02:00
ansible-playbook -l VU00.local setup.yaml
2023-04-29 21:03:43 +02:00
ansible-playbook --key-file ~/.ssh/keys/gjk-ansible setup.yaml
```
2023-06-08 15:14:46 +02:00
Tags can be used to execute or exclude specific parts of the playbook.
```
ansible-playbook -t grub setup.yaml
ansible-playbook -t [grub, software] setup.yaml
ansible-playbook --skip-tags software setup.yaml
```
2023-04-29 21:03:43 +02:00
## SSH configuration
You should setup your ssh to avoid unnecessary settings when running a playbook, for example:
```
Host VU* MU*
User root
IdentityFile ~/.ssh/keys/gjk-ansible
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
```