diff options
author | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2018-11-27 15:02:27 +0100 |
---|---|---|
committer | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2018-11-27 15:02:27 +0100 |
commit | d6db6f83a1c299da4ee7e18092c3b76c0c2cfe2d (patch) | |
tree | 79582e4d69a98cb5854c78c6a0a1a49ceb4232dd /roles |
Base system
Diffstat (limited to 'roles')
-rw-r--r-- | roles/base_users/tasks/main.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/roles/base_users/tasks/main.yml b/roles/base_users/tasks/main.yml new file mode 100644 index 0000000..bf9f6f8 --- /dev/null +++ b/roles/base_users/tasks/main.yml @@ -0,0 +1,20 @@ +--- +- name: Create docker group + group: name=docker state=present + +- name: Create remote_access group + group: name=remote_access state=present + +- name: Add users + user: + name: "{{ item.login }}" + groups: "users{% if 'groups' in item %},{{ item.groups|join(',') }}{% endif %}" + shell: "{{ item.shell }}" + with_items: "{{ users }}" + +- name: Setup authorized keys for users + authorized_key: + user: "{{ item.login }}" + key: "{{ item.pubkey }}" + with_items: "{{ users }}" + |