mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixed states to work with comment_line
This commit is contained in:
parent
b1cedd1153
commit
b3e44e342c
1 changed files with 2 additions and 2 deletions
|
@ -2755,7 +2755,7 @@ def comment(name, regex, char='#', backup='.bak'):
|
|||
slines = fp_.readlines()
|
||||
|
||||
# Perform the edit
|
||||
__salt__['file.comment'](name, regex, char, backup)
|
||||
__salt__['file.comment_line'](name, regex, char, True, backup)
|
||||
|
||||
with salt.utils.fopen(name, 'rb') as fp_:
|
||||
nlines = fp_.readlines()
|
||||
|
@ -2849,7 +2849,7 @@ def uncomment(name, regex, char='#', backup='.bak'):
|
|||
slines = fp_.readlines()
|
||||
|
||||
# Perform the edit
|
||||
__salt__['file.uncomment'](name, regex, char, backup)
|
||||
__salt__['file.comment_line'](name, regex, char, False, backup)
|
||||
|
||||
with salt.utils.fopen(name, 'rb') as fp_:
|
||||
nlines = fp_.readlines()
|
||||
|
|
Loading…
Add table
Reference in a new issue