Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12239723
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/pillar/top.sls b/pillar/devserver/repos.sls
similarity index 50%
copy from pillar/top.sls
copy to pillar/devserver/repos.sls
index 58bff06..c91596e 100644
--- a/pillar/top.sls
+++ b/pillar/devserver/repos.sls
@@ -1,22 +1,17 @@
# -------------------------------------------------------------
# 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
index 58bff06..2fbea9f 100644
--- a/pillar/top.sls
+++ b/pillar/top.sls
@@ -1,22 +1,23 @@
# -------------------------------------------------------------
# Salt configuration for Nasqueron servers
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2016-04-10
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
base:
'*':
- core.users
- core.groups
- certificates.certificates
- nodes.nodes
- nodes.forests
- hotfixes.roles
- webserver.sites
ysul:
+ - devserver.repos
- viperserv.bots
- viperserv.fantoir
- webserver.labs
- webserver.wwwroot51
diff --git a/roles/devserver/userland-home/init.sls b/roles/devserver/userland-home/init.sls
index ad527f1..4677618 100644
--- a/roles/devserver/userland-home/init.sls
+++ b/roles/devserver/userland-home/init.sls
@@ -1,10 +1,11 @@
# -------------------------------------------------------------
# Salt — Provision user content
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2018-03-08
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
- .homefiles
+ - .repos
diff --git a/roles/devserver/userland-home/repos.sls b/roles/devserver/userland-home/repos.sls
new file mode 100644
index 0000000..4fce2e0
--- /dev/null
+++ b/roles/devserver/userland-home/repos.sls
@@ -0,0 +1,33 @@
+# -------------------------------------------------------------
+# 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
+ {% if salt['node.has_role']('saltmaster') %}
+ # TODO: find an alternative solution for other servers (suggest rSTAGING?)
+ - identity: /opt/salt/security/id_ed25519
+ {% endif %}
+
+{% endfor %}
+
+{% endfor %}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Oct 12, 00:06 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064284
Default Alt Text
(3 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment