Wrapper for rsync
2014.1.0 新版功能.
This data can also be passed into pillar. Options passed into opts will overwrite options passed into pillar.
salt.modules.rsync.
config
(conf_path='/etc/rsyncd.conf')¶在 2016.3.0 版更改: Return data now contains just the contents of the rsyncd.conf as a
string, instead of a dictionary as returned from cmd.run_all
.
Returns the contents of the rsync config file
CLI 范例:
salt '*' rsync.config
salt.modules.rsync.
rsync
(src, dst, delete=False, force=False, update=False, passwordfile=None, exclude=None, excludefrom=None)¶在 2016.3.0 版更改: Return data now contains just the output of the rsync command, instead
of a dictionary as returned from cmd.run_all
.
Rsync files from src to dst
CLI 范例:
salt '*' rsync.rsync {src} {dst} {delete=True} {update=True} {passwordfile=/etc/pass.crt} {exclude=xx}
salt '*' rsync.rsync {src} {dst} {delete=True} {excludefrom=/xx.ini}
salt.modules.rsync.
version
()¶在 2016.3.0 版更改: Return data now contains just the version number as a string, instead
of a dictionary as returned from cmd.run_all
.
Returns rsync version
CLI 范例:
salt '*' rsync.version