Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Fix crontab argument order for writing #3750

Merged
merged 1 commit into from
May 27, 2016
Merged

Fix crontab argument order for writing #3750

merged 1 commit into from
May 27, 2016

Conversation

AMDmi3
Copy link
Contributor

@AMDmi3 AMDmi3 commented May 26, 2016

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

cron module

ANSIBLE VERSION
ansible 2.0.2.0
  config file = /home/amdmi3/.ansible.cfg
  configured module search path = Default w/o overrides
SUMMARY

Currently, when writing user's crontab, ansible calls

crontab <file> -u <user>

This is incorrect according to crontab(1) on both FreeBSD and Linux,
which suggest that file argument should be the last.

At least on FreeBSD, this leads to incorrect cron module bahavior which
writes to root's crontab instead of users's

Currently, when writing user's crontab, ansible calls

    crontab <file> -u <user>

This is incorrect according to crontab(1) on both FreeBSD and Linux,
which suggest that file argument should be the last.

At least on FreeBSD, this leads to incorrect cron module bahavior which
writes to root's crontab instead of users's
@gregdek
Copy link
Contributor

gregdek commented May 26, 2016

Thanks @AMDmi3. To the current maintainers, @dsummersl, @EvanK please review according to guidelines (http://docs.ansible.com/ansible/developing_modules.html#module-checklist) and comment with text 'shipit', 'needs_revision' or 'close_me' as appropriate.

[This message brought to you by your friendly Ansibull-bot.]

@EvanK
Copy link
Contributor

EvanK commented May 26, 2016

shipit

@gregdek
Copy link
Contributor

gregdek commented May 26, 2016

Thanks again to @AMDmi3 for this PR, and thanks @dsummersl, @EvanK for reviewing. Marking for inclusion.

[This message brought to you by your friendly Ansibull-bot.]

@resmo resmo merged commit 68cb864 into ansible:devel May 27, 2016
resmo pushed a commit that referenced this pull request May 27, 2016
Currently, when writing user's crontab, ansible calls

    crontab <file> -u <user>

This is incorrect according to crontab(1) on both FreeBSD and Linux,
which suggest that file argument should be the last.

At least on FreeBSD, this leads to incorrect cron module bahavior which
writes to root's crontab instead of users's
@AMDmi3 AMDmi3 deleted the crontab-write-fix branch May 27, 2016 10:37
@gtrafimenkov
Copy link
Contributor

This change reverts 7a0b488

I guess check of platform.system() is required.

@AMDmi3
Copy link
Contributor Author

AMDmi3 commented May 28, 2016

See #2807 (summary: 7a0b488 was probably bogus, crontab always works with -u <user> <file>, including busybox).

abadger pushed a commit to abadger/ansible-modules-core that referenced this pull request Jun 17, 2016
Currently, when writing user's crontab, ansible calls

    crontab <file> -u <user>

This is incorrect according to crontab(1) on both FreeBSD and Linux,
which suggest that file argument should be the last.

At least on FreeBSD, this leads to incorrect cron module bahavior which
writes to root's crontab instead of users's
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants