From 9bd5613b87e4d38d65646ff2dea9c025b5ea914c Mon Sep 17 00:00:00 2001
From: Emil Renner Berthing <esmil@labitat.dk>
Date: Tue, 9 Oct 2018 14:23:15 +0200
Subject: users: make user groups configurable

On the doorputer we want to put every user
in both the dialout group and the sudo group
---
 roles/users/defaults/main.yml  | 5 +++++
 roles/users/tasks/ast.yml      | 3 +--
 roles/users/tasks/esmil.yml    | 3 +--
 roles/users/tasks/flummer.yml  | 3 +--
 roles/users/tasks/k2OS.yml     | 3 +--
 roles/users/tasks/knielsen.yml | 3 +--
 roles/users/tasks/riiiis.yml   | 3 +--
 roles/users/tasks/semi.yml     | 3 +--
 roles/users/tasks/signout.yml  | 3 +--
 9 files changed, 13 insertions(+), 16 deletions(-)
 create mode 100644 roles/users/defaults/main.yml

(limited to 'roles')

diff --git a/roles/users/defaults/main.yml b/roles/users/defaults/main.yml
new file mode 100644
index 0000000..b7d58a5
--- /dev/null
+++ b/roles/users/defaults/main.yml
@@ -0,0 +1,5 @@
+---
+user_groups:
+- '{{ sudo_group }}'
+
+# vim: set ts=2 sw=2 et:
diff --git a/roles/users/tasks/ast.yml b/roles/users/tasks/ast.yml
index 3fe9874..7f0c6f4 100644
--- a/roles/users/tasks/ast.yml
+++ b/roles/users/tasks/ast.yml
@@ -6,8 +6,7 @@
     shell: '/bin/bash'
     uid: 2001
     group: users
-    groups:
-    - '{{ sudo_group }}'
+    groups: '{{ user_groups }}'
 
 - name: ast - authorized_keys
   authorized_key:
diff --git a/roles/users/tasks/esmil.yml b/roles/users/tasks/esmil.yml
index 57d2dc1..4d8cfa3 100644
--- a/roles/users/tasks/esmil.yml
+++ b/roles/users/tasks/esmil.yml
@@ -6,8 +6,7 @@
     shell: '/bin/bash'
     uid: 2000
     group: users
-    groups:
-    - '{{ sudo_group }}'
+    groups: '{{ user_groups }}'
 
 - name: esmil - authorized_keys
   authorized_key:
diff --git a/roles/users/tasks/flummer.yml b/roles/users/tasks/flummer.yml
index 4c48677..96b737d 100644
--- a/roles/users/tasks/flummer.yml
+++ b/roles/users/tasks/flummer.yml
@@ -6,8 +6,7 @@
     shell: '/bin/bash'
     uid: 2002
     group: users
-    groups:
-    - '{{ sudo_group }}'
+    groups: '{{ user_groups }}'
 
 - name: flummer - authorized_keys
   authorized_key:
diff --git a/roles/users/tasks/k2OS.yml b/roles/users/tasks/k2OS.yml
index 68e094d..c53a5ad 100644
--- a/roles/users/tasks/k2OS.yml
+++ b/roles/users/tasks/k2OS.yml
@@ -6,8 +6,7 @@
     shell: '/bin/bash'
     uid: 2005
     group: users
-    groups:
-    - '{{ sudo_group }}'
+    groups: '{{ user_groups }}'
 
 - name: k2OS - authorized_keys
   authorized_key:
diff --git a/roles/users/tasks/knielsen.yml b/roles/users/tasks/knielsen.yml
index 6b008db..6ba4f75 100644
--- a/roles/users/tasks/knielsen.yml
+++ b/roles/users/tasks/knielsen.yml
@@ -6,8 +6,7 @@
     shell: '/bin/bash'
     uid: 2004
     group: users
-    groups:
-    - '{{ sudo_group }}'
+    groups: '{{ user_groups }}'
 
 - name: knielsen - authorized_keys
   authorized_key:
diff --git a/roles/users/tasks/riiiis.yml b/roles/users/tasks/riiiis.yml
index d150477..b5e0437 100644
--- a/roles/users/tasks/riiiis.yml
+++ b/roles/users/tasks/riiiis.yml
@@ -6,8 +6,7 @@
     shell: '/bin/bash'
     uid: 2003
     group: users
-    groups:
-    - '{{ sudo_group }}'
+    groups: '{{ user_groups }}'
 
 - name: riiiis - authorized_keys
   authorized_key:
diff --git a/roles/users/tasks/semi.yml b/roles/users/tasks/semi.yml
index c34a172..8c05bfb 100644
--- a/roles/users/tasks/semi.yml
+++ b/roles/users/tasks/semi.yml
@@ -6,8 +6,7 @@
     shell: '/bin/bash'
     uid: 2010
     group: users
-    groups:
-    - '{{ sudo_group }}'
+    groups: '{{ user_groups }}'
 
 - name: semi - authorized_keys
   authorized_key:
diff --git a/roles/users/tasks/signout.yml b/roles/users/tasks/signout.yml
index d360bc1..631e3e4 100644
--- a/roles/users/tasks/signout.yml
+++ b/roles/users/tasks/signout.yml
@@ -6,8 +6,7 @@
     shell: '/bin/bash'
     uid: 2024
     group: users
-    groups:
-    - '{{ sudo_group }}'
+    groups: '{{ user_groups }}'
 
 - name: signout - authorized_keys
   authorized_key:
-- 
cgit v1.2.1