Cleanup playbook execution
This change removes the extra RC handling being done in the pre-flight function. The playbook runner will raise an exception by default so there's no need to retrap and raise when the RC code is > 0 outside of the primary method. Change-Id: I19a32cfe412d507f1668affe995efdfb8c4366f4 Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
parent
9902d7469a
commit
4fa342362a
@ -89,17 +89,14 @@ def _check_diskspace(upgrade=False):
|
||||
playbook_args = constants.DEPLOY_ANSIBLE_ACTIONS['preflight-deploy']
|
||||
|
||||
with utils.TempDirs() as tmp:
|
||||
rc, _ = utils.run_ansible_playbook(
|
||||
utils.run_ansible_playbook(
|
||||
workdir=tmp,
|
||||
inventory='undercloud',
|
||||
connection='local',
|
||||
output_callback='validation_output',
|
||||
playbook_dir=constants.ANSIBLE_VALIDATION_DIR,
|
||||
fail_on_rc=False,
|
||||
**playbook_args
|
||||
)
|
||||
if rc != 0:
|
||||
raise RuntimeError(_("Disk space check failed"))
|
||||
|
||||
|
||||
def _check_memory():
|
||||
|
Loading…
x
Reference in New Issue
Block a user