From 10531d71e49904a75f49f6a7eb3ab15f65f175c8 Mon Sep 17 00:00:00 2001
From: shaofeng_cheng <chengsf@winhong.com>
Date: Fri, 2 Jun 2017 15:13:23 +0800
Subject: [PATCH] Fix vnc_enabled warning

Remove option vnc_enabled from group default.
Add option enabled in group vnc.

Change-Id: Ia48b335fd9d160b53bc2ec98b7e3bc5b89b9c553
Closes-Bug: #1695181
---
 ansible/roles/nova/templates/nova.conf.j2 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2
index 606d7218cd..bcb6ada3c8 100644
--- a/ansible/roles/nova/templates/nova.conf.j2
+++ b/ansible/roles/nova/templates/nova.conf.j2
@@ -24,7 +24,6 @@ scheduler_host_manager = ironic_host_manager
 host={{ ansible_hostname }}-ironic
 log_file = /var/log/kolla/nova/nova-compute-ironic.log
 compute_driver = ironic.IronicDriver
-vnc_enabled = False
 ram_allocation_ratio = 1.0
 reserved_host_memory_mb = 0
 {% elif enable_nova_fake | bool %}
@@ -60,6 +59,9 @@ workers = {{ openstack_service_workers }}
 
 {% if nova_console == 'novnc' %}
 [vnc]
+{% if service_name == "nova-compute-ironic" %}
+enabled = false
+{% else %}
 novncproxy_host = {{ api_interface_address }}
 novncproxy_port = {{ nova_novncproxy_port }}
 vncserver_listen = {{ api_interface_address }}
@@ -67,6 +69,7 @@ vncserver_proxyclient_address = {{ api_interface_address }}
 {% if inventory_hostname in groups['compute'] %}
 novncproxy_base_url = {{ public_protocol }}://{% if orchestration_engine == 'KUBERNETES' %}kolla_kubernetes_external_vip{% else %}{{ kolla_external_fqdn }}{% endif %}:{{ nova_novncproxy_port }}/vnc_auto.html
 {% endif %}
+{% endif %}
 {% elif nova_console == 'spice' %}
 [vnc]
 # We have to turn off vnc to use spice
-- 
GitLab