mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
Allow None value maximum_timeout for gitlab_runner (#11174)
* change maximum_timeout type to raw * allow None value for maximum_timeout in update_runner * add changelog * update changelog fragment formatting * convert maximum_timeout value of 0 to None * fix sanity check errors * add suggested doc changes * Note version required for timeout disable --------- Co-authored-by: colin <cosulli3@jaguarlandrover.com>
This commit is contained in:
parent
862fe79a22
commit
86d6ef8d0e
2 changed files with 8 additions and 2 deletions
|
|
@ -132,6 +132,7 @@ options:
|
|||
maximum_timeout:
|
||||
description:
|
||||
- The maximum time that a runner has to complete a specific job.
|
||||
- Use V(0) to disable the timeout. This is available since community.general 12.1.0.
|
||||
default: 3600
|
||||
type: int
|
||||
run_untagged:
|
||||
|
|
@ -365,7 +366,7 @@ class GitLabRunner:
|
|||
changed = False
|
||||
|
||||
for arg_key, arg_value in arguments.items():
|
||||
if arg_value is not None:
|
||||
if arg_value is not None or arg_key == "maximum_timeout":
|
||||
if isinstance(arg_value, list):
|
||||
list1 = getattr(runner, arg_key)
|
||||
list1.sort()
|
||||
|
|
@ -475,7 +476,10 @@ def main():
|
|||
run_untagged = module.params["run_untagged"]
|
||||
runner_locked = module.params["locked"]
|
||||
access_level = module.params["access_level"]
|
||||
maximum_timeout = module.params["maximum_timeout"]
|
||||
if module.params["maximum_timeout"] == 0:
|
||||
maximum_timeout = None
|
||||
else:
|
||||
maximum_timeout = module.params["maximum_timeout"]
|
||||
registration_token = module.params["registration_token"]
|
||||
project = module.params["project"]
|
||||
group = module.params["group"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue