return changes on test as well

This commit is contained in:
Clint Armstrong 2016-01-29 11:38:27 -05:00
parent e611f0269c
commit 5c28efa9d3

View File

@ -624,14 +624,14 @@ def pem_managed(name,
ret['comment'] = 'The file is already in the correct state'
return ret
ret['changes']['new'] = new
ret['changes']['old'] = current
if __opts__['test'] is True:
ret['result'] = None
ret['comment'] = 'The file {0} will be updated.'.format(name)
return ret
ret['changes']['new'] = new
ret['changes']['old'] = current
if os.path.isfile(name) and backup:
bkroot = os.path.join(__opts__['cachedir'], 'file_backup')
salt.utils.backup_minion(name, bkroot)