From b719782d4424a0537cea1a40364c10d7d9a9fe80 Mon Sep 17 00:00:00 2001 From: "Chung Chih, Hung" Date: Fri, 6 Jan 2017 17:47:52 +0800 Subject: [PATCH] Secret generate fail with hostvars is undefined When Kolla-kubernetes try to generate secret, it will found one file named ansible/group_vars/all.yml at kolla reporitory. Then try to render the file. There is one variable named tunnel_interface_addres which will access hostvars variable, but this variable is not exist at kubernetes orchestration engine. We should add condition statement which will determine whether orchestration engine is ansible. Co-Authored-By: Duong Ha-Quang Change-Id: I998a7540de3dcae53acb73de79fb8a8e76cc4225 Closed-Bug: 1649247 --- ansible/group_vars/all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index b6469cbdd9..42636127e5 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -119,7 +119,7 @@ cluster_interface: "{{ network_interface }}" tunnel_interface: "{{ network_interface }}" bifrost_network_interface: "{{ network_interface }}" dns_interface: "{{ network_interface }}" -tunnel_interface_address: "{{ hostvars[inventory_hostname]['ansible_' + tunnel_interface]['ipv4']['address'] }}" +tunnel_interface_address: "{{ hostvars[inventory_hostname]['ansible_' + tunnel_interface]['ipv4']['address'] if orchestration_engine == 'ANSIBLE' else '0.0.0.0' }}" # Valid options are [ openvswitch, linuxbridge, sfc ] neutron_plugin_agent: "openvswitch"