Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4026234
D359.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D359.diff
View Options
diff --git a/top.sls b/pillar/top.sls
copy from top.sls
copy to pillar/top.sls
--- a/top.sls
+++ b/pillar/top.sls
@@ -7,5 +7,5 @@
# -------------------------------------------------------------
base:
- 'eglide':
- - roles/shellserver/userland-software
+ eglide:
+ - users.shellusers
diff --git a/pillar/users/shellusers.sls b/pillar/users/shellusers.sls
new file mode 100644
--- /dev/null
+++ b/pillar/users/shellusers.sls
@@ -0,0 +1,16 @@
+# -------------------------------------------------------------
+# Salt — Users accounts list
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Eglide
+# Created: 2016-04-08
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Users accounts
+# -------------------------------------------------------------
+
+shellusers:
+ tomjerr:
+ fullname: Tommy Aditya
+ uid: 2001
diff --git a/roles/shellserver/users/users.sls b/roles/shellserver/users/init.sls
rename from roles/shellserver/users/users.sls
rename to roles/shellserver/users/init.sls
--- a/roles/shellserver/users/users.sls
+++ b/roles/shellserver/users/init.sls
@@ -35,11 +35,13 @@
# Active accounts
# -------------------------------------------------------------
-tomjerr:
+{% for user, args in pillar.get('shellusers', {}).iteritems() %}
+{{user}}:
user.present:
- - fullname: Tommy Aditya
+ - fullname: {{ args['fullname'] }}
- shell: /bin/bash
- - uid: 2001
+ - uid: {{ args['uid'] }}
+{% endfor %}
# -------------------------------------------------------------
# Groups
@@ -50,13 +52,18 @@
- system: True
- gid: 200
- members:
- - tomjerr
+{% for user, args in pillar.get('shellusers', {}).iteritems() %}
+ - {{user}}
+{% endfor %}
# -------------------------------------------------------------
# Managed SSH keys
# -------------------------------------------------------------
-sshkeys:
+{% for user, args in pillar.get('shellusers', {}).iteritems() %}
+sshkey_{{user}}:
ssh_auth.present:
- - user: tomjerr
- - source: salt://roles/shellserver/users/files/ssh_keys/tomjerr
+ - user: {{user}}
+ - source: salt://roles/shellserver/users/files/ssh_keys/{{user}}
+{% endfor %}
+
diff --git a/top.sls b/top.sls
--- a/top.sls
+++ b/top.sls
@@ -9,3 +9,4 @@
base:
'eglide':
- roles/shellserver/userland-software
+ - roles/shellserver/users
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 21, 13:53 (21 h, 3 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2365203
Default Alt Text
D359.diff (2 KB)
Attached To
Mode
D359: Scale roles/shellserver/users/ to support several users account
Attached
Detach File
Event Timeline
Log In to Comment