mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
file copy ret result True if no change in test mode
This commit is contained in:
parent
a02d043309
commit
327d343fef
1 changed files with 10 additions and 5 deletions
|
@ -3654,11 +3654,16 @@ def copy(
|
|||
)
|
||||
|
||||
if __opts__['test']:
|
||||
ret['comment'] = 'File "{0}" is set to be copied to "{1}"'.format(
|
||||
source,
|
||||
name
|
||||
)
|
||||
ret['result'] = None
|
||||
if changed:
|
||||
ret['comment'] = 'File "{0}" is set to be copied to "{1}"'.format(
|
||||
source,
|
||||
name
|
||||
)
|
||||
ret['result'] = None
|
||||
else:
|
||||
ret['comment'] = ('The target file "{0}" exists and will not be '
|
||||
'overwritten'.format(name))
|
||||
ret['result'] = True
|
||||
return ret
|
||||
|
||||
if not changed:
|
||||
|
|
Loading…
Add table
Reference in a new issue