test(dispatcher): cert needs to match each hostname
[arvados-formula.git] / test / salt / states / example_single_host_host_entries / init.sls
similarity index 59%
rename from test/salt/states/hosts_entries/init.sls
rename to test/salt/states/example_single_host_host_entries/init.sls
index 378571e4255dc509225f9fea8b07583768a790cb..a043333d106e5e5775089f5249a853732935704a 100644 (file)
@@ -1,8 +1,15 @@
+{% set curr_tpldir = tpldir %}
+{% set tpldir = 'arvados' %}
+{% from "arvados/map.jinja" import arvados with context %}
+{% set tpldir = curr_tpldir %}
+
 arvados_hosts_entries:
   host.present:
     - ip: {{ grains.get('ipv4')[0] }}
     - names:
 arvados_hosts_entries:
   host.present:
     - ip: {{ grains.get('ipv4')[0] }}
     - names:
-      - {{ grains.get('fqdn') }}
+      - {{ arvados.cluster.name }}.{{ arvados.cluster.domain }}
+      # FIXME! This just works for our testings.
+      # Won't work if the cluster name != host name
       {%- for entry in [
           'keep',
           'keep0',
       {%- for entry in [
           'keep',
           'keep0',
@@ -14,7 +21,5 @@ arvados_hosts_entries:
         ]
       %}
       - {{ entry }}
         ]
       %}
       - {{ entry }}
-      # FIXME! This just works for our testings.
-      # Won't work if the cluster name != host name
-      - {{ entry }}.{{ grains.get('host') }}.{{ grains.get('domain') }}
+      - {{ entry }}.{{ arvados.cluster.name }}.{{ arvados.cluster.domain }}
       {%- endfor %}
       {%- endfor %}