Adding check for ignore_if_missing param when calling _check_file.

This commit is contained in:
Johnny Cook 2016-11-16 16:03:29 -06:00 committed by rallytime
parent 801ff28053
commit 1a78878b47

View file

@ -3358,7 +3358,10 @@ 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:
pass
else:
return _error(ret, check_msg)
changes = __salt__['file.replace'](name,
pattern,