Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3785748
D1404.id3581.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
D1404.id3581.diff
View Options
diff --git a/pillar/top.sls b/pillar/devserver/repos.sls
copy from pillar/top.sls
copy to pillar/devserver/repos.sls
--- a/pillar/top.sls
+++ b/pillar/devserver/repos.sls
@@ -2,21 +2,16 @@
# Salt configuration for Nasqueron servers
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2016-04-10
+# Created: 2018-03-08
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-base:
- '*':
- - core.users
- - core.groups
- - certificates.certificates
- - nodes.nodes
- - nodes.forests
- - hotfixes.roles
- - webserver.sites
- ysul:
- - viperserv.bots
- - viperserv.fantoir
- - webserver.labs
- - webserver.wwwroot51
+# Supported VCS: git/hg/svn (git by default)
+
+user_repositories:
+ dereckson:
+ /home/dereckson/dev/dereckson/git-achievements:
+ source: git@github.com:dereckson/git-achievements.git
+ /home/dereckson/.software/hg-prompt:
+ source: http://bitbucket.org/sjl/hg-prompt/
+ vcs: hg
diff --git a/pillar/top.sls b/pillar/top.sls
--- a/pillar/top.sls
+++ b/pillar/top.sls
@@ -16,6 +16,7 @@
- hotfixes.roles
- webserver.sites
ysul:
+ - devserver.repos
- viperserv.bots
- viperserv.fantoir
- webserver.labs
diff --git a/roles/devserver/userland-home/init.sls b/roles/devserver/userland-home/init.sls
--- a/roles/devserver/userland-home/init.sls
+++ b/roles/devserver/userland-home/init.sls
@@ -8,3 +8,4 @@
include:
- .homefiles
+ - .repos
diff --git a/roles/devserver/userland-home/repos.sls b/roles/devserver/userland-home/repos.sls
new file mode 100644
--- /dev/null
+++ b/roles/devserver/userland-home/repos.sls
@@ -0,0 +1,28 @@
+# -------------------------------------------------------------
+# Deploy user repositories
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-09
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Clone user repositories
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% for username, user in salt['forest.get_users']().items() %}
+
+{% set repositories = salt['pillar.get']('user_repositories:' + username, {}) %}
+
+{% for target, repo in repositories.items() %}
+{{ target }}:
+ file.directory:
+ - user: {{ username }}
+ - group: {{ username }}
+ {{ repo['vcs'] | default('git') }}.latest:
+ - name: {{ repo['source'] }}
+ - target: {{ target }}
+ - update_head: False
+{% endfor %}
+
+{% endfor %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 10:28 (20 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2266724
Default Alt Text
D1404.id3581.diff (2 KB)
Attached To
Mode
D1404: Clone VCS repositories for devserver users
Attached
Detach File
Event Timeline
Log In to Comment