summaryrefslogtreecommitdiff
path: root/durable_rules-test/j2
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2020-12-30 20:48:51 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2020-12-30 20:48:51 +0100
commit866eafabd7398fd1485e7aa285345a7dcea480d0 (patch)
treed0caab0874640678af7fd1e55685da59eb99de0e /durable_rules-test/j2
parentea985dfdb3974f3f22381be01c41dcb06a817831 (diff)
downloadrules-sandbox-866eafabd7398fd1485e7aa285345a7dcea480d0.tar.gz
rules-sandbox-866eafabd7398fd1485e7aa285345a7dcea480d0.tar.bz2
rules-sandbox-866eafabd7398fd1485e7aa285345a7dcea480d0.tar.xz
rules-sandbox-866eafabd7398fd1485e7aa285345a7dcea480d0.zip
Moving everything under durable_rules-test.
Diffstat (limited to 'durable_rules-test/j2')
-rw-r--r--durable_rules-test/j2/platform-ansible.j26
-rw-r--r--durable_rules-test/j2/terraform-machine-outputs.j27
-rw-r--r--durable_rules-test/j2/terraform-machine.j215
-rw-r--r--durable_rules-test/j2/terraform-record-set.j28
4 files changed, 36 insertions, 0 deletions
diff --git a/durable_rules-test/j2/platform-ansible.j2 b/durable_rules-test/j2/platform-ansible.j2
new file mode 100644
index 0000000..72e3247
--- /dev/null
+++ b/durable_rules-test/j2/platform-ansible.j2
@@ -0,0 +1,6 @@
+# Ansible
+- hosts:
+ - {{ m.key }}
+ tasks:
+ - import_role:
+ name: acme-platform
diff --git a/durable_rules-test/j2/terraform-machine-outputs.j2 b/durable_rules-test/j2/terraform-machine-outputs.j2
new file mode 100644
index 0000000..438fac6
--- /dev/null
+++ b/durable_rules-test/j2/terraform-machine-outputs.j2
@@ -0,0 +1,7 @@
+output "addresses" {
+ value = {
+{%- for m in machines %}
+ {{ m.key }}: scaleway_instance_ip.{{ m.key }}.address,
+{%- endfor %}
+ }
+}
diff --git a/durable_rules-test/j2/terraform-machine.j2 b/durable_rules-test/j2/terraform-machine.j2
new file mode 100644
index 0000000..889a23d
--- /dev/null
+++ b/durable_rules-test/j2/terraform-machine.j2
@@ -0,0 +1,15 @@
+resource "scaleway_instance_server" "{{ m.key }}" {
+ name = "acme-1"
+ type = "DEV1-S"
+ image = "b3042271-d2b1-4f87-b407-aedd3bbd1663"
+ ip_id = scaleway_instance_ip.{{ m.key }}.id
+ enable_dynamic_ip = false
+ enable_ipv6 = true
+}
+
+resource "scaleway_instance_ip" "{{ m.key }}" {}
+
+#resource "scaleway_instance_ip_reverse_dns" "{{ m.key }}" {
+# ip_id = scaleway_instance_ip.{{ m.key }}.id
+# reverse = "{{ m.key }}.${google_dns_managed_zone.machine.dns_name}"
+#}
diff --git a/durable_rules-test/j2/terraform-record-set.j2 b/durable_rules-test/j2/terraform-record-set.j2
new file mode 100644
index 0000000..03304bc
--- /dev/null
+++ b/durable_rules-test/j2/terraform-record-set.j2
@@ -0,0 +1,8 @@
+resource "google_dns_record_set" "{{ m.terraformId }}" {
+ name = "{{ m.fqdn }}"
+ managed_zone = "{{ m.terraformManagedZone }}"
+ type = "{{ m.rrType }}"
+ ttl = 300
+
+ rrdatas = [var.addresses.{{ m.key }}]
+}