mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Formating and syntax fixes that were pointed out during code review.
This commit is contained in:
committed by
Michael DeHaan
parent
ec04e30186
commit
9650c118cf
@@ -78,9 +78,9 @@ def main():
|
||||
script_file=dict(required=False),
|
||||
unit_count=dict(required=True),
|
||||
unit_type=dict(required=True,
|
||||
default=None,
|
||||
choices=["minutes", "hours", "days", "weeks"],
|
||||
type="str")
|
||||
default=None,
|
||||
choices=["minutes", "hours", "days", "weeks"],
|
||||
type="str")
|
||||
),
|
||||
supports_check_mode = False,
|
||||
)
|
||||
@@ -112,7 +112,7 @@ def main():
|
||||
if rc != 0:
|
||||
module.fail_json(msg=err)
|
||||
os.unlink(path)
|
||||
result['changed'] = 'true'
|
||||
result['changed'] = True
|
||||
elif script_file:
|
||||
result['script_file'] = script_file
|
||||
at_command = "%s now + %s %s -f %s" % (ATCMD, unit_count, unit_type, script_file)
|
||||
@@ -122,7 +122,7 @@ def main():
|
||||
rc, out, err = module.run_command(at_command)
|
||||
if rc != 0:
|
||||
module.fail_json(msg=err)
|
||||
result['changed'] = 'true'
|
||||
result['changed'] = True
|
||||
else:
|
||||
module.fail_json(msg="command or script_file not specified")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user