From 546122f1ae58a310e44d9b97bc29225ad7314011 Mon Sep 17 00:00:00 2001
From: Pierre Riteau <pierre@stackhpc.com>
Date: Wed, 1 Dec 2021 17:41:35 +0100
Subject: [PATCH] Update noVNC URL for noVNC >= 1.0.0

The documentation for novncproxy_base_url says:

    If using noVNC >= 1.0.0, you should use ``vnc_lite.html`` instead of
    ``vnc_auto.html``.

While novnc packages in CentOS, Debian, and Ubuntu still provide
vnc_auto.html for compatibility, this could be dropped in the future.

Change-Id: I04883c877015c1835c8b6b2c8be1fb7156ceb340
---
 ansible/roles/nova-cell/defaults/main.yml      | 2 +-
 ansible/roles/nova-cell/templates/nova.conf.j2 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ansible/roles/nova-cell/defaults/main.yml b/ansible/roles/nova-cell/defaults/main.yml
index 98f2fc6954..e89cd784d7 100644
--- a/ansible/roles/nova-cell/defaults/main.yml
+++ b/ansible/roles/nova-cell/defaults/main.yml
@@ -288,7 +288,7 @@ nova_novncproxy_enable_healthchecks: "{{ enable_container_healthchecks }}"
 nova_novncproxy_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
 nova_novncproxy_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
 nova_novncproxy_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
-nova_novncproxy_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address |  put_address_in_context('url') }}:{{ nova_novncproxy_listen_port }}/vnc_auto.html"]
+nova_novncproxy_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address |  put_address_in_context('url') }}:{{ nova_novncproxy_listen_port }}/vnc_lite.html"]
 nova_novncproxy_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
 nova_novncproxy_healthcheck:
   interval: "{{ nova_novncproxy_healthcheck_interval }}"
diff --git a/ansible/roles/nova-cell/templates/nova.conf.j2 b/ansible/roles/nova-cell/templates/nova.conf.j2
index 8f29686f18..5adb22c263 100644
--- a/ansible/roles/nova-cell/templates/nova.conf.j2
+++ b/ansible/roles/nova-cell/templates/nova.conf.j2
@@ -49,7 +49,7 @@ novncproxy_port = {{ nova_novncproxy_listen_port }}
 server_listen = {{ api_interface_address }}
 server_proxyclient_address = {{ api_interface_address }}
 {% if inventory_hostname in groups[nova_cell_compute_group] %}
-novncproxy_base_url = {{ public_protocol }}://{{ nova_novncproxy_fqdn | put_address_in_context('url') }}:{{ nova_novncproxy_port }}/vnc_auto.html
+novncproxy_base_url = {{ public_protocol }}://{{ nova_novncproxy_fqdn | put_address_in_context('url') }}:{{ nova_novncproxy_port }}/vnc_lite.html
 {% endif %}
 {% endif %}
 {% elif nova_console == 'spice' %}