1
0
Fork 0

Compare commits

...

3 Commits

@ -18,12 +18,23 @@ Void has `sshd` enabled by default as well as having `prohibit-password` set for
## Running a playbook
Here are some examples for running a playbook.
```
ansible-playbook setup.yaml
ansible-playbook -l teachers setup.yaml
ansible-playbook -l VU00.local setup.yaml
ansible-playbook --key-file ~/.ssh/keys/gjk-ansible setup.yaml
```
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
```
## SSH configuration
You should setup your ssh to avoid unnecessary settings when running a playbook, for example:

@ -1,6 +1,7 @@
---
- name: SSH
hosts: all
tags: ssh
tasks:
- name: Ensure root ssh directory exists
@ -18,6 +19,7 @@
- name: General
hosts: all
tags: general
tasks:
- name: Install services
@ -51,6 +53,7 @@
- name: Users
hosts: all
tags: users
tasks:
- name: Set bash as default shell for root
@ -73,7 +76,7 @@
path: '{{ item }}'
owner: root
group: root
mode: 644
mode: 0644
state: touch
loop:
- /home/student/.bashrc
@ -88,6 +91,7 @@
- name: Software
hosts: all
tags: software
tasks:
- name: Add non-free repository
@ -115,6 +119,9 @@
- name: Gnome
hosts: all
tags:
- gnome
- software
handlers:
- name: Update dconf database
@ -177,6 +184,7 @@
- name: PipeWire
hosts: all
tags: pipewire
tasks:
- name: Install PipeWire
@ -215,6 +223,7 @@
- name: GRUB
hosts: all
tags: grub
handlers:
- name: grub-mkconfig
@ -247,6 +256,7 @@
- name: Bakaláři
hosts: teachers
tags: bakalari
tasks:
- name: Create a desktop shortcut for Bakaláři

Loading…
Cancel
Save