When using the 'special' key to give a time period like @hourly, the identifier comment isn't added above the cronjob in the crontab. This means that if the command is changed, a new cronjob is added instead of the correct one modified.
testfile.sls
test cronjob:
cron.present:
- name: 'echo foo'
- special: '@hourly'
- identifier: some cronjob
Expected something like the following:
# SALT_CRON_IDENTIFIER:test cronjob
@hourly echo bar
````
Instead I find:
@hourly echo foor
@hourly echo bar
```
Salt Version:
Salt: 2016.11.1
Dependency Versions:
cffi: 1.9.1
cherrypy: 8.1.2
dateutil: 2.6.0
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.24.0
Mako: 1.0.6
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.17
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.12 (default, Nov 7 2016, 11:55:55)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.4.2
ZMQ: 4.2.0
System Versions:
dist:
machine: x86_64
release: 4.8.13-1-ARCH
system: Linux
version: Not Installed
Note: I also discoved in the docs that the cron module has a set_job and set_special function, where set_special doesn't support an identifier argument. Perhaps this is related and also not supported when using cron.present in a state.
Relevant pages in the docs:
Thanks for the pull request to fix this!
Daniel
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
As far as I see this is not fixed and still relevant. Please reopen.
Thank you for updating this issue. It is no longer marked as stale.
@cebe if this is a blocker for you, a possible workaround could be to track files under /etc/cron.d/ instead of managing crontab files with salt.
Not a blocker but I think it should be fixed. Thanks for the workaround :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
still relevant.
Thank you for updating this issue. It is no longer marked as stale.