Files
basic-role/tasks/users.yml
Emmanouil Kampitakis c13aa7bd6a Fix ansible lint errors
2020-02-27 07:49:40 +01:00

17 lines
420 B
YAML

---
- name: "Add users"
user:
name: "{{ os_user.name }}"
comment: "{{ os_user.comment }}"
uid: "{{ os_user.uid }}"
shell: "{{ os_user.shell }}"
groups: "{{ os_user.groups }}"
state: "{{ os_user.state | default('present') }}"
become: true
- name: Copy local ssh key to authorized keys file
authorized_key:
user: "{{ os_user.name }}"
key: "{{ os_user.ssh_auth_key }}"
become: true