ref(playbook): Move all plays into separate directory

This commit is contained in:
Marty Oehme 2025-02-23 10:23:24 +01:00
parent 996560410e
commit 8e79c5f804
Signed by: Marty
GPG key ID: 4E535BC19C61886E
7 changed files with 6 additions and 6 deletions

38
books/void_user.yaml Normal file
View file

@ -0,0 +1,38 @@
- name: Set up primary user
hosts: target_system
become: true
vars:
user_name: marty
user_pass: marty
user_shell: zsh
user_groups:
- wheel
- _seatd # TODO: This will error if it does not exist (seatd not installed)
- audio
- dialout
- disk
- input
- kvm
- lp
- plugdev
- scanner
- storage
- usbmon
- video
tasks:
- name: Enable sudo for "wheel" group
ansible.builtin.lineinfile:
path: "/etc/sudoers"
regexp: '^# %wheel ALL=(ALL) ALL$'
line: '%wheel ALL=(ALL) ALL'
- name: Add user
ansible.builtin.user:
name: "{{ user_name }}"
password: "{{ user_pass | password_hash('sha512', 'supersecretsalt') }}"
create_home: true
shell: "/bin/{{ user_shell }}"
group: "{{ user_name }}"
groups: "{{ user_groups }}"
generate_ssh_key: true