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

Co-authored-by: Jack Farzan <jfarzan@adobe.com>
This commit is contained in:
Jack Farzan
2024-10-01 14:45:27 -07:00
committed by GitHub
co-authored by Jack Farzan
parent 79e8c4c26c
commit 4c8fb12fc2
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
---
minor_changes:
- cron - Provide additional error information while writing cron file (https://github.com/ansible/ansible/issues/83223).
+1 -1
View File
@@ -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: