mirror of
https://github.com/koodiklinikka/playbooks.git
synced 2026-03-09 19:02:37 +00:00
initial
This commit is contained in:
17
roles/base/tasks/users.yml
Normal file
17
roles/base/tasks/users.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: create admin group
|
||||
group: name=admin state=present
|
||||
|
||||
- name: create users
|
||||
user: >
|
||||
name={{ item.name }}
|
||||
groups=admin
|
||||
shell=/bin/bash
|
||||
password={{ item.password }}
|
||||
with_items: users
|
||||
|
||||
- name: set authorized keys
|
||||
authorized_key: >
|
||||
user='{{ item.name }}'
|
||||
key='{{lookup('file', item.public_key)}}'
|
||||
with_items: users
|
||||
Reference in New Issue
Block a user