Extracted the basic role from the madonsible playbook
This commit is contained in:
16
tasks/users.yml
Normal file
16
tasks/users.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: "Add user {{ os_user.name }}"
|
||||
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 }}"
|
||||
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
|
||||
Reference in New Issue
Block a user