test(dispatcher): add helper state
[arvados-formula.git] / test / salt / states / hosts_entries / init.sls
diff --git a/test/salt/states/hosts_entries/init.sls b/test/salt/states/hosts_entries/init.sls
new file mode 100644 (file)
index 0000000..378571e
--- /dev/null
@@ -0,0 +1,20 @@
+arvados_hosts_entries:
+  host.present:
+    - ip: {{ grains.get('ipv4')[0] }}
+    - names:
+      - {{ grains.get('fqdn') }}
+      {%- for entry in [
+          'keep',
+          'keep0',
+          'collections',
+          'download',
+          'ws',
+          'workbench',
+          'workbench2'
+        ]
+      %}
+      - {{ entry }}
+      # FIXME! This just works for our testings.
+      # Won't work if the cluster name != host name
+      - {{ entry }}.{{ grains.get('host') }}.{{ grains.get('domain') }}
+      {%- endfor %}