Skip to content

Commit

Permalink
Use kwargs for auto_release_time (#637)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <berendt@osism.tech>
  • Loading branch information
berendt authored Oct 26, 2023
1 parent b1dff72 commit 2914495
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions osism/commands/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,24 @@ def handle_role(
environment = f"{environment}.{sub}"
if role.startswith("ceph-"):
t = ceph.run.delay(
environment, role[5:], arguments, auto_release_time=task_timeout
environment,
role[5:],
arguments,
{"auto_release_time": task_timeout},
)
else:
t = ceph.run.delay(
environment, role, arguments, auto_release_time=task_timeout
environment, role, arguments, {"auto_release_time": task_timeout}
)
elif role == "loadbalancer-ng":
if sub:
environment = f"{environment}.{sub}"
g = group(
kolla.run.si(
environment, playbook, arguments, auto_release_time=task_timeout
environment,
playbook,
arguments,
{"auto_release_time": task_timeout},
)
for playbook in enums.LOADBALANCER_PLAYBOOKS
)
Expand All @@ -201,7 +207,7 @@ def handle_role(
environment,
"loadbalancer-ng",
arguments,
auto_release_time=task_timeout,
{"auto_release_time": task_timeout},
)
| g
).apply_async()
Expand All @@ -221,7 +227,7 @@ def handle_role(
kolla_arguments = [f"-e kolla_action={action}"] + arguments

t = kolla.run.delay(
environment, role, kolla_arguments, auto_release_time=task_timeout
environment, role, kolla_arguments, {"auto_release_time": task_timeout}
)
else:
# Overwrite the environment
Expand All @@ -234,7 +240,7 @@ def handle_role(
f" {environment} was not found."
)
t = ansible.run.delay(
environment, role, arguments, auto_release_time=task_timeout
environment, role, arguments, {"auto_release_time": task_timeout}
)

if isinstance(t, GroupResult):
Expand Down

0 comments on commit 2914495

Please sign in to comment.