Page MenuHomeDevCentral

D1431.diff
No OneTemporary

D1431.diff

diff --git a/roles/paas-docker/letsencrypt/init.sls b/roles/paas-docker/letsencrypt/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/letsencrypt/init.sls
@@ -0,0 +1,41 @@
+# -------------------------------------------------------------
+# Salt — Provision Docker engine
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-16
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% set has_selinux = salt['grains.get']('selinux:enabled', False) %}
+
+# -------------------------------------------------------------
+# See also
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# Wrapper script
+# - wrappers/init.Sls
+# - wrappers/files/certbot.sh
+#
+# Image
+# - /pillar/paas/docker.Sls
+#
+# Nginx configuration
+# - nginx/files/includes/letsencrypt
+
+# -------------------------------------------------------------
+# Data directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/letsencrypt:
+ file.directory
+
+{% if has_selinux %}
+selinux_context_jenkins_home:
+ selinux.fcontext_policy_present:
+ - name: /srv/letsencrypt
+ - sel_type: svirt_sandbox_file_t
+
+selinux_context_jenkins_home_applied:
+ selinux.fcontext_policy_applied:
+ - name: /srv/letsencrypt
+{% endif %}
diff --git a/roles/paas-docker/wrappers/files/certbot.sh b/roles/paas-docker/wrappers/files/certbot.sh
--- a/roles/paas-docker/wrappers/files/certbot.sh
+++ b/roles/paas-docker/wrappers/files/certbot.sh
@@ -17,7 +17,7 @@
# </auto-generated>
docker run -it --rm \
- -v /data/letsencrypt/etc:/etc/letsencrypt \
- -v /data/letsencrypt/var:/var/lib/letsencrypt \
- -v /data/letsencrypt/www:/www \
+ -v /srv/letsencrypt/etc:/etc/letsencrypt \
+ -v /srv/letsencrypt/var:/var/lib/letsencrypt \
+ -v /srv/letsencrypt/www:/www \
certbot/certbot:latest "$*"

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 04:11 (19 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2261762
Default Alt Text
D1431.diff (1 KB)

Event Timeline