mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #35456 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
This commit is contained in:
commit
9b2c075611
@ -543,7 +543,8 @@ Reload
|
||||
------
|
||||
|
||||
``reload_modules`` is a boolean option that forces salt to reload its modules
|
||||
after a state finishes. See :ref:`Reloading Modules <reloading-modules>`.
|
||||
after a state finishes. ``reload_pillar`` and ``reload_grains`` can also be set.
|
||||
See :ref:`Reloading Modules <reloading-modules>`.
|
||||
|
||||
Unless
|
||||
------
|
||||
|
@ -855,6 +855,8 @@ def push_dir(path, glob=None, upload_path=None):
|
||||
filelist += [os.path.join(root, tmpfile) for tmpfile in files]
|
||||
if glob is not None:
|
||||
filelist = [fi for fi in filelist if fnmatch.fnmatch(os.path.basename(fi), glob)]
|
||||
if not filelist:
|
||||
return False
|
||||
for tmpfile in filelist:
|
||||
if upload_path and tmpfile.startswith(path):
|
||||
tmpupload_path = os.path.join(os.path.sep,
|
||||
|
@ -3599,8 +3599,7 @@ def append(name,
|
||||
text = _validate_str_list(text)
|
||||
|
||||
with salt.utils.fopen(name, 'rb') as fp_:
|
||||
slines = fp_.readlines()
|
||||
slines = [item.rstrip() for item in slines]
|
||||
slines = fp_.read().splitlines()
|
||||
|
||||
append_lines = []
|
||||
try:
|
||||
@ -3648,8 +3647,7 @@ def append(name,
|
||||
ret['comment'] = 'File {0} is in correct state'.format(name)
|
||||
|
||||
with salt.utils.fopen(name, 'rb') as fp_:
|
||||
nlines = fp_.readlines()
|
||||
nlines = [item.rstrip(os.linesep) for item in nlines]
|
||||
nlines = fp_.read().splitlines()
|
||||
|
||||
if slines != nlines:
|
||||
if not salt.utils.istextfile(name):
|
||||
|
Loading…
Reference in New Issue
Block a user