Paolo Asperti a7051f1cb8
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Added full name / Support for libreschool-pxeserver
2020-03-30 17:42:10 +02:00

23 lines
691 B
YAML

---
- name: Create Admin user
user:
name: "{{ esmith.adminusers.username }}"
groups: adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare
comment: "{{ esmith.adminusers.fullname }}"
append: yes
state: present
- name: Set Admin password
user:
name: "{{ esmith.adminusers.username }}"
password: "{{ esmith.adminusers.password }}"
when: (esmith.adminusers.password is defined) and (esmith.adminusers.password|length > 0)
- name: Set authorized_key
authorized_key:
user: "{{ esmith.adminusers.username }}"
state: present
key: "{{ esmith.adminusers.sshkey }}"
when: (esmith.adminusers.sshkey is defined) and (esmith.adminusers.sshkey|length > 0)