summaryrefslogtreecommitdiff
path: root/modules/ri-base/src/main/resources/templates/dba/cluster.j2
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-02-03 16:35:48 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-02-03 16:35:48 +0100
commitbafe762ac01d16904c18404283027e426e19bc73 (patch)
treec22688ad186f5ce635f525704c5035f91b983b68 /modules/ri-base/src/main/resources/templates/dba/cluster.j2
parent91abd0b04320a9c9d932df195aca38c1cacfcc5a (diff)
downloadrules-sandbox-bafe762ac01d16904c18404283027e426e19bc73.tar.gz
rules-sandbox-bafe762ac01d16904c18404283027e426e19bc73.tar.bz2
rules-sandbox-bafe762ac01d16904c18404283027e426e19bc73.tar.xz
rules-sandbox-bafe762ac01d16904c18404283027e426e19bc73.zip
Code reorganization.
Moving main code to src, keeping modules in modules/
Diffstat (limited to 'modules/ri-base/src/main/resources/templates/dba/cluster.j2')
-rw-r--r--modules/ri-base/src/main/resources/templates/dba/cluster.j219
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/ri-base/src/main/resources/templates/dba/cluster.j2 b/modules/ri-base/src/main/resources/templates/dba/cluster.j2
new file mode 100644
index 0000000..045fbcd
--- /dev/null
+++ b/modules/ri-base/src/main/resources/templates/dba/cluster.j2
@@ -0,0 +1,19 @@
+# Generated
+
+# cluster: {{ cluster.name }}
+{%- for m, containers in containersByMachine.entrySet() %}
+---
+- host:
+ - {{ m.name }}
+ tasks:
+ import_role:
+ name: docker-service
+ vars:
+ template: |
+ version: "3"
+ services:
+{%- for c in containers %}
+ {{ c.name }}:
+ image: {{ c.image }}:{{ c.tag }}
+{%- endfor %}
+{% endfor %}