cdist/cdist/conf/type/__rsync/man.rst

111 lines
2.4 KiB
ReStructuredText
Raw Normal View History

cdist-type__rsync(7)
====================
NAME
----
cdist-type__rsync - Mirror directories using rsync
2016-05-20 06:50:56 +00:00
Nico Schottelius <nico-cdist--@--schottelius.org>
DESCRIPTION
-----------
WARNING: This type is of BETA quality:
- it has not been tested widely
- interfaces *may* change
- if there is a better approach to solve the problem -> the type may even vanish
If you are fine with these constraints, please read on.
This cdist type allows you to mirror local directories to the
target host using rsync. Rsync will be installed in the manifest of the type.
If group or owner are giveng, a recursive chown will be executed on the
target host.
A slash will be appended to the source directory so that only the contents
of the directory are taken and not the directory name itself.
2016-05-20 06:50:56 +00:00
REQUIRED PARAMETERS
-------------------
2016-05-20 06:50:56 +00:00
source
Where to take files from
OPTIONAL PARAMETERS
-------------------
2016-05-20 06:50:56 +00:00
group
Group to chgrp to.
2016-05-20 06:50:56 +00:00
owner
User to chown to.
2016-05-20 06:50:56 +00:00
destination
Use this as the base destination instead of the object id
2016-05-20 06:50:56 +00:00
remote-user
Use this user instead of the default "root" for rsync operations.
2015-06-15 13:57:11 +00:00
OPTIONAL MULTIPLE PARAMETERS
----------------------------
2016-05-20 06:50:56 +00:00
rsync-opts
Use this option to give rsync options with.
See rsync(1) for available options.
Only "--" options are supported.
Write the options without the beginning "--"
Can be specified multiple times.
2015-06-15 13:57:11 +00:00
MESSAGES
--------
NONE
EXAMPLES
--------
2016-05-20 06:50:56 +00:00
.. code-block:: sh
2016-05-20 06:50:56 +00:00
# You can use any source directory
__rsync /tmp/testdir \
--source /etc
2016-05-20 06:50:56 +00:00
# Use source from type
__rsync /etc \
--source "$__type/files/package"
2016-05-20 06:50:56 +00:00
# Allow multiple __rsync objects to write to the same dir
__rsync mystuff \
--destination /usr/local/bin \
--source "$__type/files/package"
2016-05-20 06:50:56 +00:00
__rsync otherstuff \
--destination /usr/local/bin \
--source "$__type/files/package2"
2016-05-20 06:50:56 +00:00
# Use rsync option --exclude
__rsync /tmp/testdir \
--source /etc \
--rsync-opts exclude=sshd_conf
2016-05-20 06:50:56 +00:00
# Use rsync with multiple options --exclude --dry-run
__rsync /tmp/testing \
--source /home/tester \
--rsync-opts exclude=id_rsa \
--rsync-opts dry-run
SEE ALSO
--------
2016-05-20 06:50:56 +00:00
- `cdist-type(7) <cdist-type.html>`_
2015-06-11 06:54:34 +00:00
- rsync(1)
COPYING
-------
Copyright \(C) 2015 Nico Schottelius. Free use of this software is
granted under the terms of the GNU General Public License version 3 (GPLv3).