mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Implement Rsync summary extractor
This commit is contained in:
parent
57a8454253
commit
eab59dd5d6
@ -29,9 +29,19 @@ def __virtual__():
|
||||
return salt.utils.which('rsync') and 'rsync' or False
|
||||
|
||||
|
||||
def _get_summary(rsync_out):
|
||||
def synchronized(name, source, delete=False, force=False, update=False,
|
||||
passwordfile=None, exclude=None, excludefrom=None):
|
||||
'''
|
||||
Get summary from the rsync successfull output.
|
||||
|
||||
:param rsync_out:
|
||||
:return:
|
||||
'''
|
||||
|
||||
return "- " + "\n- ".join([elm for elm in rsync_out.split("\n\n")[-1].replace(" ", "\n").split("\n") if elm])
|
||||
|
||||
|
||||
Synchronizing directories:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
Loading…
Reference in New Issue
Block a user