Page MenuHomeDevCentral

D2050.id5180.diff
No OneTemporary

D2050.id5180.diff

diff --git a/_modules/paas_docker.py b/_modules/paas_docker.py
--- a/_modules/paas_docker.py
+++ b/_modules/paas_docker.py
@@ -10,6 +10,9 @@
# -------------------------------------------------------------
+from six import iteritems
+
+
def get_image(default_image, args):
"""
A function to output a pillar key in JSON.
@@ -48,3 +51,18 @@
subnets.append("172.17.0.0/16")
return subnets
+
+
+def _build_container_info_dict(container, key, value):
+ return {'container': container, key: value}
+
+
+def get_containers_info(service, key):
+ containers = __pillar__['docker_containers'][__grains__['id']]
+
+ if service not in containers:
+ return []
+
+ return [{'container': container, key: args[key]}
+ for container, args
+ in iteritems(containers[service])]
diff --git a/roles/paas-docker/wrappers/files/openfire.sh b/roles/paas-docker/wrappers/files/openfire.sh
new file mode 100644
--- /dev/null
+++ b/roles/paas-docker/wrappers/files/openfire.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# PaaS Docker
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2018-03-15
+# License: Trivial work, not eligible to copyright
+# Source file: roles/paas-docker/wrappers/files/openfire.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>
+
+# -------------------------------------------------------------
+# Helper methods
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+getcommandname() {
+ basename "$0"
+}
+
+usage() {
+ echo "Usage: $(getcommandname) <command>"
+ exit 1
+}
+
+unknown_command() {
+ echo "$(getcommandname): $COMMAND: unknown command"
+ usage
+}
+
+# -------------------------------------------------------------
+# Commands
+#
+# :: phpbb storage: connects to MySQL database
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+propagate-certificates() {
+ {{
+#>>> for args in hosts:
+#... print("docker cp --follow-link /srv/.../" + args['host'] + '/foo.crt', args['container'] + ':/tmp/certs/')
+#
+# Goal:
+# docker cp --follow-link /srv/letsencrypt/etc/live/xmpp.nasqueron.org/chain.pem openfire:/tmp
+
+}
+
+# -------------------------------------------------------------
+# Check arguments
+#
+# $1: wiki name (database name or alias)
+# $2: script to call
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+if [ $# -lt 1 ]; then
+ usage
+fi
+
+COMMAND=$1
+shift 1
+
+# -------------------------------------------------------------
+# Run command
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+if [ "$COMMAND" = "storage" ]; then
+ phpbb_storage
+else
+ unknown_command
+fi

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 16:03 (19 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260488
Default Alt Text
D2050.id5180.diff (3 KB)

Event Timeline