mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-17 01:11:28 +00:00
[PR #11658/25a4f568 backport][stable-12] puppet: deprecate param timeout (#11665)
puppet: deprecate param timeout (#11658)
* puppet: deprecate param timeout
* add changelog frag
* Update changelogs/fragments/11658-puppet-timeout-deprecation.yml
---------
(cherry picked from commit 25a4f568f9)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
4dfe6816a8
commit
555d7b9038
4 changed files with 47 additions and 6 deletions
|
|
@ -52,12 +52,11 @@ def puppet_runner(module: AnsibleModule) -> CmdRunner:
|
|||
# If this can be replaced with ansible `timeout` parameter in playbook,
|
||||
# then this function could be removed.
|
||||
def _prepare_base_cmd():
|
||||
_tout_cmd = module.get_bin_path("timeout", False)
|
||||
if _tout_cmd:
|
||||
cmd = ["timeout", "-s", "9", module.params["timeout"], _puppet_cmd(module)]
|
||||
else:
|
||||
cmd = ["puppet"]
|
||||
return cmd
|
||||
if module.params["timeout"]:
|
||||
_tout_cmd = module.get_bin_path("timeout", False)
|
||||
if _tout_cmd:
|
||||
return ["timeout", "-s", "9", module.params["timeout"], _puppet_cmd(module)]
|
||||
return ["puppet"]
|
||||
|
||||
def noop_func(v):
|
||||
return ["--noop"] if module.check_mode or v else ["--no-noop"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue