Skip to content
Snippets Groups Projects
Unverified Commit 436de45d authored by Aivars Sterns's avatar Aivars Sterns Committed by GitHub
Browse files

Merge pull request #2295 from manics/supplementary-bugfix

Fix indexing of supplementary DNS in openssl.conf
parents 5f186a28 6b80ac65
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,10 @@ DNS.5 = localhost ...@@ -15,9 +15,10 @@ DNS.5 = localhost
{% for host in groups['kube-master'] %} {% for host in groups['kube-master'] %}
DNS.{{ 5 + loop.index }} = {{ host }} DNS.{{ 5 + loop.index }} = {{ host }}
{% endfor %} {% endfor %}
{% set idns = groups['kube-master'] | length | int + 5 %}
{% if loadbalancer_apiserver is defined %} {% if loadbalancer_apiserver is defined %}
{% set idx = groups['kube-master'] | length | int + 5 + 1 %} {% set idns = idns + 1 %}
DNS.{{ idx | string }} = {{ apiserver_loadbalancer_domain_name }} DNS.{{ idns | string }} = {{ apiserver_loadbalancer_domain_name }}
{% endif %} {% endif %}
{% for host in groups['kube-master'] %} {% for host in groups['kube-master'] %}
IP.{{ 2 * loop.index - 1 }} = {{ hostvars[host]['access_ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }} IP.{{ 2 * loop.index - 1 }} = {{ hostvars[host]['access_ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}
...@@ -36,7 +37,7 @@ IP.{{ idx + 1 }} = 127.0.0.1 ...@@ -36,7 +37,7 @@ IP.{{ idx + 1 }} = 127.0.0.1
{% if addr | ipaddr %} {% if addr | ipaddr %}
IP.{{ is + loop.index }} = {{ addr }} IP.{{ is + loop.index }} = {{ addr }}
{% else %} {% else %}
DNS.{{ is + loop.index }} = {{ addr }} DNS.{{ idns + loop.index }} = {{ addr }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment