summaryrefslogtreecommitdiff
path: root/roles/admin-user/tasks
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-12-16 18:27:38 +0100
committerChristian Pointner <equinox@spreadspace.org>2017-12-16 18:27:38 +0100
commit8e366699a69045664758f7496b7a145bee33e0b7 (patch)
tree2daa8c94e0c697b0d27ce9d6604c12c8a97187ce /roles/admin-user/tasks
parentkubernetes base for dione and helene (diff)
added admin-user role
Diffstat (limited to 'roles/admin-user/tasks')
-rw-r--r--roles/admin-user/tasks/main.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/admin-user/tasks/main.yaml b/roles/admin-user/tasks/main.yaml
new file mode 100644
index 00000000..e6fc3572
--- /dev/null
+++ b/roles/admin-user/tasks/main.yaml
@@ -0,0 +1,17 @@
+---
+- name: install sudo
+ apt:
+ name: sudo
+ state: present
+
+- name: add admin users
+ with_items: "{{ admin_user_group | default([]) | union(admin_user_host | default([])) }}"
+ user:
+ name: "{{ item.name }}"
+ state: present
+ password: "{{ item.password | default(omit) }}"
+ groups:
+ - sudo
+ - adm
+ append: yes
+ shell: "{{ item.shell | default(omit) }}"