mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #34095 from rallytime/bp-32396
Back-port #32396 to 2016.3
This commit is contained in:
commit
c596bf5744
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue