summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/tasks/sysuser.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ands_kaas/tasks/sysuser.yml')
-rw-r--r--roles/ands_kaas/tasks/sysuser.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/ands_kaas/tasks/sysuser.yml b/roles/ands_kaas/tasks/sysuser.yml
new file mode 100644
index 0000000..4e213fe
--- /dev/null
+++ b/roles/ands_kaas/tasks/sysuser.yml
@@ -0,0 +1,15 @@
+- name: Ensure user is existing on the system
+ user:
+ name: "{{ user }}"
+ uid: "{{ spec.uid | default(omit) }}"
+ group: "{{ spec.group | default(omit) }}"
+ comment: "{{ spec.name | default(omit) }}"
+ password: "{{ spec.password | default(omit) }}"
+ shell: "{{ spec.shell | default('/bin/false') }}"
+ home: "{{ spec.home | default(omit) }}"
+ state: present
+
+# Configure ssh keys if specified
+
+- name: Add group
+ user: name="{{ user }}" groups="{{ new_group }}" append="yes"