Merge pull request #34095 from rallytime/bp-32396

Back-port #32396 to 2016.3
This commit is contained in:
Mike Place 2016-06-21 09:12:39 -07:00 committed by GitHub
commit c596bf5744

View file

@ -540,6 +540,7 @@ def file(name,
__env__,
context,
defaults,
False, # skip_verify
**kwargs
)
except Exception as exc:
@ -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)