mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
[5.0.0] Remove Ansible 2.9 / ansible-base 2.10 compatibility code (#4548)
* Remove Ansible 2.9 / ansible-base 2.10 compatibility code. * Remove path_join shim from BOTMETA. * Update comment. * Bump minimally required ansible-core version.
This commit is contained in:
parent
36a0eca193
commit
1a9b3214fd
22 changed files with 44 additions and 276 deletions
|
@ -263,13 +263,7 @@ def main():
|
|||
cmd = args
|
||||
else:
|
||||
cmd = args + [new_value]
|
||||
try: # try using extra parameter from ansible-base 2.10.4 onwards
|
||||
(rc, out, err) = module.run_command(cmd, cwd=dir, ignore_invalid_cwd=False, expand_user_and_vars=False)
|
||||
except TypeError:
|
||||
# @TODO remove try/except when community.general drop support for 2.10.x
|
||||
if not os.path.isdir(dir):
|
||||
module.fail_json(msg="Cannot find directory '{0}'".format(dir))
|
||||
(rc, out, err) = module.run_command(cmd, cwd=dir, expand_user_and_vars=False)
|
||||
(rc, out, err) = module.run_command(cmd, cwd=dir, ignore_invalid_cwd=False, expand_user_and_vars=False)
|
||||
if err:
|
||||
module.fail_json(rc=rc, msg=err, cmd=cmd)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue