system/void_user.yaml

32 lines
735 B
YAML

- name: Set up primary user
hosts: guest
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: 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