Skip to content

Commit

Permalink
Timeout on custom plays explicitly set to 60 seconds (#638)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Oct 26, 2023
1 parent b1dff72 commit 38ee968
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 12 additions & 5 deletions osism/commands/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,18 @@ def handle_role(
if overwrite:
environment = overwrite

logger.info(
f"An attempt is made to execute a role that is provided in the configuration repository. "
f"If there is no further output following this output, the role {role} in the environment"
f" {environment} was not found."
)
if environment in ["custom"] or role not in MAP_ROLE2ENVIRONMENT:
task_timeout = 60
timeout = 60

logger.info(
"An attempt is made to execute a role that is provided in the "
"configuration repository. If there is no further output "
f"following this output, the role {role} in the environment "
f"{environment} was not found. The timeout is explicitly "
f"set to {timeout} seconds."
)

t = ansible.run.delay(
environment, role, arguments, auto_release_time=task_timeout
)
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/custom-plays-timeout-9fd5f0452a11aae5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- |
Timeout on custom plays explicitly set to 60 seconds.

0 comments on commit 38ee968

Please sign in to comment.