cron: return stdout and rc for cron command (#83290)

Co-authored-by: Jack Farzan <jfarzan@adobe.com>
pull/84038/head
Jack Farzan 1 year ago committed by GitHub
parent 79e8c4c26c
commit 4c8fb12fc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,3 @@
---
minor_changes:
- cron - Provide additional error information while writing cron file (https://github.com/ansible/ansible/issues/83223).

@ -328,7 +328,7 @@ class CronTab(object):
os.unlink(path)
if rc != 0:
self.module.fail_json(msg=err)
self.module.fail_json(msg=f"Failed to install new cronfile: {path}", stderr=err, stdout=out, rc=rc)
# set SELinux permissions
if self.module.selinux_enabled() and self.cron_file:

Loading…
Cancel
Save