From cd3fcafbbe38853163de9214b6e91110dae7c672 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 16 Sep 2020 17:50:21 +0200 Subject: [PATCH] Recover support for installing stable/ussuri While not encouraged, it's sometimes requested. This change checks git_branch and avoids http_basic with JSON RPC. Story: #2008151 Task: #40896 Change-Id: I38b55e060fe363e2e6f569f10b6d6aab6cb8d12c --- playbooks/roles/bifrost-ironic-install/defaults/main.yml | 7 +++++++ .../roles/bifrost-ironic-install/templates/ironic.conf.j2 | 2 ++ 2 files changed, 9 insertions(+) diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index d4296902b..04d04d86c 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -253,6 +253,13 @@ ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}" # conditional statements in the playbooks. noauth_mode: true +# A work around for installing older releases, remove when no longer supporting +# Ussuri. +git_branch: master +supports_http_auth: >- + {{ git_branch == "master" + or git_branch[7:] not in ["queens", "rocky", "stein", "train", "ussuri"] }} + # Keystone Support # Default parameter if keystone is enabled, or disabled. enable_keystone: false diff --git a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 index 32d301a12..194e71f77 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 @@ -187,6 +187,8 @@ username = {{ ironic.service_catalog.username }} password = {{ ironic.service_catalog.password }} user_domain_id = default project_domain_id = default +{% elif not supports_http_auth | bool %} +auth_strategy = none {% else %} auth_strategy = http_basic auth_type = http_basic