23 lines
614 B
YAML
23 lines
614 B
YAML
- 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:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: "700"
|
|
owner: "{{ pruefungsuser }}"
|
|
group: "{{ pruefungsgruppe }}"
|
|
with_items:
|
|
- "/home/{{ pruefungsuser }}/.config/"
|
|
- "/home/{{ pruefungsuser }}/Schreibtisch/" |