From ad3e828de839c6a13f2f65c89079efea4b110b27 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Tue, 2 Feb 2021 20:45:26 -0500 Subject: [PATCH] Support OS_AUTH_TYPE=none in inventory module Adds support for when the conn.session object is of type NoAuth. This removes the restriction for requiring credentials for an installed undercloud when running overcloud deploy with ephemeral heat. Change-Id: I25f8dd51432cbcd013f030feefbe5525c157484a Signed-off-by: James Slagle --- .../modules/tripleo_generate_ansible_inventory.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tripleo_ansible/ansible_plugins/modules/tripleo_generate_ansible_inventory.py b/tripleo_ansible/ansible_plugins/modules/tripleo_generate_ansible_inventory.py index 8b5edb713..33bcc368d 100644 --- a/tripleo_ansible/ansible_plugins/modules/tripleo_generate_ansible_inventory.py +++ b/tripleo_ansible/ansible_plugins/modules/tripleo_generate_ansible_inventory.py @@ -125,12 +125,17 @@ def run_module(): tripleo = tc.TripleOCommon(session=conn.session) heat = tripleo.get_orchestration_client() + auth_url = getattr(conn.session.auth, "auth_url", None) + username = getattr(conn.session.auth, "_username", None) + project = getattr(conn.session.auth, "_project_name", None) + cacert = getattr(conn.session.auth, "verify", None) + inventory_path = inventory.generate_tripleo_ansible_inventory( heat, - conn.session.auth.auth_url, - conn.session.auth._username, - conn.session.auth._project_name, - conn.session.verify, + auth_url, + username, + project, + cacert, plan, work_dir, python_interpretor,