Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3919700
D1027.id2643.diff
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
D1027.id2643.diff
View Options
diff --git a/map.jinja b/map.jinja
--- a/map.jinja
+++ b/map.jinja
@@ -34,3 +34,18 @@
'tcsh': '/bin/tcsh',
},
}, default='Debian') %}
+
+{% set packages = salt['grains.filter_by']({
+ 'Debian' : {
+ 'sphinx': 'python3-sphinx',
+ },
+ 'RedHat': {
+ 'sphinx': 'python3-sphinx',
+ },
+ 'Arch': {
+ 'sphinx': 'python-sphinx',
+ },
+ 'FreeBSD' : {
+ 'sphinx': 'py27-sphinx',
+ },
+}, default='Debian') %}
diff --git a/roles/legacy-webserver/init.sls b/roles/legacy-webserver/init.sls
--- a/roles/legacy-webserver/init.sls
+++ b/roles/legacy-webserver/init.sls
@@ -9,3 +9,4 @@
include:
- .be/dereckson
+ - .org/nasqueron
diff --git a/roles/legacy-webserver/org/nasqueron/docs.sls b/roles/legacy-webserver/org/nasqueron/docs.sls
new file mode 100644
--- /dev/null
+++ b/roles/legacy-webserver/org/nasqueron/docs.sls
@@ -0,0 +1,36 @@
+# -------------------------------------------------------------
+# Salt — Provision docs.nasqueron.org website
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import packages with context %}
+
+# -------------------------------------------------------------
+# Deploy a rSW docs dir HTML build to docs.n.o/salt-wrapper
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/var/wwwroot/nasqueron.org/docs/salt-wrapper:
+ file.directory:
+ - user: deploy
+ - group: web
+ - dir_mode: 755
+
+salt_wrapper_doc_build:
+ cmd.script:
+ - source: salt://roles/legacy-webserver/org/nasqueron/files/build-docs-salt-wrapper.sh
+ - args: /var/wwwroot/nasqueron.org/docs/salt-wrapper
+ - cwd: /tmp
+ - runas: deploy
+ - require:
+ - file: /var/wwwroot/nasqueron.org/docs/salt-wrapper
+ - pkg: sphinx
+
+# -------------------------------------------------------------
+# Software to build the docs
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+sphinx:
+ pkg.installed:
+ - name: {{ packages.sphinx }}
diff --git a/roles/legacy-webserver/org/nasqueron/files/build-docs-salt-wrapper.sh b/roles/legacy-webserver/org/nasqueron/files/build-docs-salt-wrapper.sh
new file mode 100644
--- /dev/null
+++ b/roles/legacy-webserver/org/nasqueron/files/build-docs-salt-wrapper.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# The salt-wrapper documentation is stored in the main repository
+git clone https://devcentral.nasqueron.org/source/salt-wrapper.git
+
+# Build documentation
+cd salt-wrapper/docs || exit 1
+make html
+
+# Deploy
+mv _build/html/* "$1"
+
+# Clean
+cd ../.. || exit 2
+rm -rf salt-wrapper
diff --git a/roles/legacy-webserver/init.sls b/roles/legacy-webserver/org/nasqueron/init.sls
copy from roles/legacy-webserver/init.sls
copy to roles/legacy-webserver/org/nasqueron/init.sls
--- a/roles/legacy-webserver/init.sls
+++ b/roles/legacy-webserver/org/nasqueron/init.sls
@@ -1,11 +1,9 @@
# -------------------------------------------------------------
-# Salt — Sites to provision on the legacy web server
-#
-# Currently, this is deployed to ysul.nasqueron.org
+# Salt — Provision *.nasqueron.org sites
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
- - .be/dereckson
+ - .docs
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 12:05 (17 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2309254
Default Alt Text
D1027.id2643.diff (3 KB)
Attached To
Mode
D1027: Deploy docs.nasqueron.org/salt-wrapper
Attached
Detach File
Event Timeline
Log In to Comment