Merge "Limit standalone ceph-admin user creation to a single host" into stable/wallaby

This commit is contained in:
Zuul 2022-07-01 00:02:08 +00:00 committed by Gerrit Code Review
commit 7c51c4284d

View File

@ -880,8 +880,16 @@ class OvercloudCephUserEnable(command.Command):
}
for limit_list in [ceph_hosts['_admin'], ceph_hosts['non_admin']]:
if len(limit_list) > 0:
# need to include the undercloud where the keys are generated
limit_list.append('undercloud')
if parsed_args.standalone:
# In standalone, Ansible groups allovercloud and undercloud
# denote the same single host. So just use undercloud to
# avoid LP 1979093.
limit_list = ['undercloud']
else:
# Need to include the undercloud, where the keys are
# generated, in the subset of allovercloud hosts,
# denoted by limit_list.
limit_list.append('undercloud')
with oooutils.TempDirs() as tmp:
oooutils.run_ansible_playbook(
playbook='ceph-admin-user-playbook.yml',