mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #39910 from rallytime/bp-37743
Back-port #37743 to 2016.11
This commit is contained in:
commit
77ecff4e02
1 changed files with 5 additions and 1 deletions
|
@ -3358,7 +3358,11 @@ def replace(name,
|
|||
|
||||
check_res, check_msg = _check_file(name)
|
||||
if not check_res:
|
||||
return _error(ret, check_msg)
|
||||
if ignore_if_missing and 'file not found' in check_msg:
|
||||
ret['comment'] = 'No changes needed to be made'
|
||||
return ret
|
||||
else:
|
||||
return _error(ret, check_msg)
|
||||
|
||||
changes = __salt__['file.replace'](name,
|
||||
pattern,
|
||||
|
|
Loading…
Add table
Reference in a new issue