Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cron: return stdout and rc for cron command #83290

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

jackfarzan
Copy link

SUMMARY

Adds a little more info to cron module output, as referenced in #83223

ISSUE TYPE
  • Feature Pull Request

@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. module This issue/PR relates to a module. labels May 21, 2024
@@ -325,7 +325,7 @@ def write(self, backup_file=None):
os.unlink(path)

if rc != 0:
self.module.fail_json(msg=err)
self.module.fail_json(msg=err, stdout=out, rc=rc)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a changelog and test for this change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move err to stderr= and update msg= with ''failed to install new cronfile: {path}' or something similar and informative that does not rely on (mostly cryptic) OS errors.

@Akasurde Akasurde changed the title Update cron cron: return stdout and rc for cron command May 21, 2024
@mattclay mattclay removed the needs_triage Needs a first human triage before being processed. label May 23, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request. module This issue/PR relates to a module. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants