Merge "Change generate_ansible_inventory() arguments"

This commit is contained in:
Zuul 2020-05-27 09:43:30 +00:00 committed by Gerrit Code Review
commit 1e3c4044cc
3 changed files with 11 additions and 6 deletions

View File

@ -533,7 +533,9 @@ class AnsibleGenerateInventoryAction(base.TripleOAction):
heat=self.get_orchestration_client(context),
work_dir=self.work_dir,
plan=self.plan_name,
auth=context.security,
auth_url=context.security.auth_uri,
username=context.security.user_name,
project_name=context.security.project_name,
ansible_ssh_user=self.ansible_ssh_user,
undercloud_key_file=self.undercloud_key_file,
ansible_python_interpreter=self.ansible_python_interpreter,

View File

@ -382,7 +382,9 @@ class TripleoInventory(object):
yaml.dump(inventory, inventory_file, TemplateDumper)
def generate_tripleo_ansible_inventory(heat, auth,
def generate_tripleo_ansible_inventory(heat, auth_url,
username,
project_name,
cacert=None,
plan='overcloud',
work_dir=None,
@ -397,10 +399,10 @@ def generate_tripleo_ansible_inventory(heat, auth,
work_dir, 'tripleo-ansible-inventory.yaml')
inv = TripleoInventory(
hclient=heat,
auth_url=auth.auth_uri,
auth_url=auth_url,
username=username,
project_name=project_name,
cacert=cacert,
project_name=auth.project_name,
username=auth.user_name,
ansible_ssh_user=ansible_ssh_user,
undercloud_key_file=undercloud_key_file,
undercloud_connection=UNDERCLOUD_CONNECTION_SSH,

View File

@ -166,13 +166,14 @@ def deploy_stack(swift, heat, container, skip_deploy_identifier=False,
stack_is_new = stack is None
# update StackAction, DeployIdentifier and UpdateIdentifier
# update StackAction, DeployIdentifier
parameters = dict()
if not skip_deploy_identifier:
parameters['DeployIdentifier'] = int(time.time())
else:
parameters['DeployIdentifier'] = ''
parameters['StackAction'] = 'CREATE' if stack_is_new else 'UPDATE'
try: