summaryrefslogtreecommitdiff
path: root/j2/dba
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-01-12 20:57:56 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-01-12 21:35:09 +0100
commit250cb0fb4fa9787c78b73b44425676cfec3a7944 (patch)
tree5a5c15990b15203d8e6386a9ebeb49de2bf0fea5 /j2/dba
parent5f294077a362d0127146882e6c90b863c4f54703 (diff)
downloadrules-sandbox-250cb0fb4fa9787c78b73b44425676cfec3a7944.tar.gz
rules-sandbox-250cb0fb4fa9787c78b73b44425676cfec3a7944.tar.bz2
rules-sandbox-250cb0fb4fa9787c78b73b44425676cfec3a7944.tar.xz
rules-sandbox-250cb0fb4fa9787c78b73b44425676cfec3a7944.zip
Starting on generating ansible files for docker-compose setups.
Diffstat (limited to 'j2/dba')
-rw-r--r--j2/dba/cluster.j219
1 files changed, 19 insertions, 0 deletions
diff --git a/j2/dba/cluster.j2 b/j2/dba/cluster.j2
new file mode 100644
index 0000000..87973ff
--- /dev/null
+++ b/j2/dba/cluster.j2
@@ -0,0 +1,19 @@
+# Generated
+
+# cluster: {{ cluster.name }}
+{%- for m, containers in containersByMachine.entrySet() %}
+---
+- host:
+ - {{ m }}
+ tasks:
+ import_role:
+ name: docker-service
+ vars:
+ template: |
+ version: "3"
+ services:
+{%- for c in containers %}
+ {{ c.name }}:
+ image: {{ c.image }}:{{ c.tag }}
+{%- endfor %}
+{% endfor %}