Page MenuHomeDevCentral

D1422.id3625.diff
No OneTemporary

D1422.id3625.diff

diff --git a/pillar/paas/docker.sls b/pillar/paas/docker.sls
--- a/pillar/paas/docker.sls
+++ b/pillar/paas/docker.sls
@@ -11,6 +11,8 @@
# See https://docs.saltstack.com/en/latest/ref/states/all/salt.states.docker_image.html
docker_images:
+ '*':
+ - certbot/certbot
dwellers:
# Core services
- nasqueron/mysql
diff --git a/roles/paas-docker/docker/images.sls b/roles/paas-docker/docker/images.sls
--- a/roles/paas-docker/docker/images.sls
+++ b/roles/paas-docker/docker/images.sls
@@ -6,7 +6,7 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% set images = salt['pillar.get']('docker_images:' + grains['id'], []) %}
+{% set images = salt['node.filter_by_name']('docker_images', []) %}
# -------------------------------------------------------------
# Fetch Docker images
diff --git a/roles/paas-docker/wrappers/files/certbot.sh b/roles/paas-docker/wrappers/files/certbot.sh
new file mode 100755
--- /dev/null
+++ b/roles/paas-docker/wrappers/files/certbot.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# PaaS Docker
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-15
+# License: Trivial work, not eligible to copyright
+# Source file: roles/paas-docker/wrappers/files/certbot.sh
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+docker run -it --rm \
+ -v /data/letsencrypt/etc:/etc/letsencrypt \
+ -v /data/letsencrypt/var:/var/lib/letsencrypt \
+ -v /data/letsencrypt/www:/www \
+ certbot/certbot:latest "$*"
diff --git a/roles/paas-docker/docker/images.sls b/roles/paas-docker/wrappers/init.sls
copy from roles/paas-docker/docker/images.sls
copy to roles/paas-docker/wrappers/init.sls
--- a/roles/paas-docker/docker/images.sls
+++ b/roles/paas-docker/wrappers/init.sls
@@ -2,17 +2,19 @@
# Salt — Provision Docker engine
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2018-03-10
+# Created: 2018-03-15
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% set images = salt['pillar.get']('docker_images:' + grains['id'], []) %}
+{% from "map.jinja" import dirs with context %}
# -------------------------------------------------------------
-# Fetch Docker images
-# -------------------------------------------------------------
+# Wrapper binaries
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% for image in images %}
-{{ image }}:
- docker_image.present
+{% for command in ['certbot'] %}
+{{ dirs.bin }}/{{ command }}:
+ file.managed:
+ - source: salt://roles/paas-docker/wrappers/files/{{ command }}.sh
+ - mode: 755
{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 01:47 (21 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2265628
Default Alt Text
D1422.id3625.diff (3 KB)

Event Timeline