2024-05-08 16:29:07 +02:00
|
|
|
- name: create user group
|
|
|
|
group:
|
|
|
|
name: "{{ pruefungsgruppe }}"
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: create user student
|
|
|
|
ansible.builtin.user:
|
|
|
|
name: "{{ pruefungsuser }}"
|
|
|
|
password: "{{ pruefungspasswort | password_hash('sha512') }}"
|
|
|
|
shell: /bin/bash
|
|
|
|
comment: Prüfungsbenutzer
|
|
|
|
group: "{{ pruefungsgruppe }}"
|
|
|
|
|
|
|
|
- name: create .config dir for created user
|
|
|
|
file:
|
2024-05-08 16:35:17 +02:00
|
|
|
path: "{{ item }}"
|
2024-05-08 16:29:07 +02:00
|
|
|
state: directory
|
|
|
|
mode: "700"
|
|
|
|
owner: "{{ pruefungsuser }}"
|
2024-05-08 16:35:17 +02:00
|
|
|
group: "{{ pruefungsgruppe }}"
|
|
|
|
with_items:
|
|
|
|
- "/home/{{ pruefungsuser }}/.config/"
|
|
|
|
- "/home/{{ pruefungsuser }}/Schreibtisch/"
|