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

Back-port #32396 to 2016.3 #34095

Merged
merged 2 commits into from
Jun 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion salt/states/cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ def file(name,
__env__,
context,
defaults,
False, # skip_verify
**kwargs
)
except Exception as exc:
Expand Down Expand Up @@ -573,12 +574,12 @@ def file(name,
ret['comment'] = 'Unable to manage file: {0}'.format(exc)
return ret

cron_ret = None
if ret['changes']:
cron_ret = __salt__['cron.write_cron_file_verbose'](user, cron_path)
ret['changes'] = {'diff': ret['changes']['diff']}
ret['comment'] = 'Crontab for user {0} was updated'.format(user)
elif ret['result']:
cron_ret = None
ret['comment'] = 'Crontab for user {0} is in the correct ' \
'state'.format(user)

Expand Down