arch-install/roles/07_user/tasks/main.yml
Ariejan de Vroom e3aaee336c
Some checks failed
Lint / Lint (3.10) (push) Failing after 16s
Lint / Lint (3.11) (push) Failing after 19s
Update to macos install
2024-06-10 16:23:13 +02:00

36 lines
933 B
YAML

---
- name: Make sure we have a 'wheel' group
ansible.builtin.group:
name: wheel
state: present
- name: Create user
ansible.builtin.user:
name: "{{ user.name }}"
# Use: openssl passwd -salt <salt> -1 <plaintext>
password: "{{ user.password }}"
update_password: on_create
comment: "{{ user.full_name }}"
groups: "{{ user.additional_groups }}"
append: yes
shell: "{{ user.shell }}"
state: present
expires: -1
become: true
- name: Setup sudo
ansible.builtin.copy:
dest: /etc/sudoers.d/{{ user.name }}
content: "{{ user.name }} ALL=(ALL:ALL) ALL"
mode: 0440
validate: /usr/sbin/visudo -cf %s
become: true
- name: Configure pinentry for gnome3
ansible.builtin.lineinfile:
path: ~/.gnupg/gpg-agent.conf
line: "pinentry-program /usr/bin/pinentry-gnome3"
create: yes
- name: Install Bitwarden CLI settings
ansible.builtin.import_tasks: rbw.yml