From 4df25e7d379b09210810427f20a1da2b531fcc9a Mon Sep 17 00:00:00 2001 From: Michal Zegan Date: Mon, 16 Sep 2019 18:04:30 +0200 Subject: Make cicdansible to set external ip Make cicdansible to set external_ip correctly using floating ips. Change-Id: I3791ee670806c7008073389e43dec5e887abfda9 Issue-ID: OOM-2112 Signed-off-by: Michal Zegan --- tools/cicdansible/roles/install/templates/inventory.yml.j2 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/cicdansible') diff --git a/tools/cicdansible/roles/install/templates/inventory.yml.j2 b/tools/cicdansible/roles/install/templates/inventory.yml.j2 index 36bf3bd3..c828ca00 100644 --- a/tools/cicdansible/roles/install/templates/inventory.yml.j2 +++ b/tools/cicdansible/roles/install/templates/inventory.yml.j2 @@ -16,6 +16,7 @@ all: infra_host: ansible_host: infra cluster_ip: {{ hostvars['infra'].ansible_default_ipv4.address }} + external_ip: "{{ hostvars['infra'].ansible_host }}" kubernetes: children: kubernetes-node: @@ -24,6 +25,9 @@ all: {{ h }}: ansible_host: "{{ hostvars[h].ansible_default_ipv4.address }}" cluster_ip: "{{ hostvars[h].ansible_default_ipv4.address }}" +{% if h == 'node0' %} + external_ip: "{{ hostvars[h].first_node_ip }}" +{% endif %} {% endfor %} kubernetes-control-plane: hosts: -- cgit 1.2.3-korg