mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Put the sed insert statement back in to the output.
Turns out that commit a369c883
(merged in PR #18368) make a bad change to modules/makeconf.py where it removed the insertion part of a '/regex/ i\text' construction.
This commit is contained in:
parent
02658b1e60
commit
8d9acd1f89
@ -40,8 +40,10 @@ def _add_var(var, value):
|
||||
fullvar = '{0}="{1}"'.format(var, value)
|
||||
if __salt__['file.contains'](makeconf, layman):
|
||||
# TODO perhaps make this a function in the file module?
|
||||
cmd = ['sed', '-i', '/{0}/'.format(layman.replace('/', '\\/')),
|
||||
fullvar, makeconf]
|
||||
cmd = ['sed', '-i', '/{0}/ i\{1}'.format(
|
||||
layman.replace('/', '\\/'),
|
||||
fullvar),
|
||||
makeconf]
|
||||
__salt__['cmd.run'](cmd)
|
||||
else:
|
||||
__salt__['file.append'](makeconf, fullvar)
|
||||
|
Loading…
Reference in New Issue
Block a user