Fix IP allocation limit in overcloud inventory discover

After generating an inventory file in 'kayobe overcloud inventory
discover', the IP allocation playbook runs to allocate IP addresses for
the new hosts. Currently this runs without a limit, meaning it targets
all hosts. This change fixes it to use a limit of overcloud.

TrivialFix

Change-Id: Ic3a98fb9e741a2dea792b2e6cf6a6ff802d099a2
This commit is contained in:
Mark Goddard 2022-08-25 10:23:41 +01:00 committed by Pierre Riteau
parent d7fa6c5358
commit d490367634
2 changed files with 3 additions and 1 deletions
kayobe

@ -993,7 +993,8 @@ class OvercloudInventoryDiscover(KayobeAnsibleMixin, VaultMixin, Command):
"overcloud-inventory-discover"))
# If necessary, allocate IP addresses for the discovered hosts.
self.run_kayobe_playbook(parsed_args,
_get_playbook_path("ip-allocation"))
_get_playbook_path("ip-allocation"),
limit="overcloud")
# Now populate the Kolla Ansible inventory.
self.generate_kolla_ansible_config(parsed_args, service_config=False)

@ -1170,6 +1170,7 @@ class TestCase(unittest.TestCase):
mock.call(
mock.ANY,
utils.get_data_files_path("ansible", "ip-allocation.yml"),
limit="overcloud",
),
]
self.assertEqual(expected_calls, mock_run_one.call_args_list)