1CDIST-TYPE__RSYNC(7) cdist CDIST-TYPE__RSYNC(7)
2
3
4
6 cdist-type__rsync - Mirror directories using rsync
7
9 WARNING: This type is of BETA quality:
10
11 • it has not been tested widely
12
13 • interfaces may change
14
15 • if there is a better approach to solve the problem -> the type may
16 even vanish
17
18 If you are fine with these constraints, please read on.
19
20 This cdist type allows you to mirror local directories to the target
21 host using rsync. Rsync will be installed in the manifest of the type.
22 If group or owner are giveng, a recursive chown will be executed on the
23 target host.
24
25 A slash will be appended to the source directory so that only the con‐
26 tents of the directory are taken and not the directory name itself.
27
29 source Where to take files from
30
32 group Group to chgrp to.
33
34 owner User to chown to.
35
36 destination
37 Use this as the base destination instead of the object id
38
39 remote-user
40 Use this user instead of the default "root" for rsync opera‐
41 tions.
42
44 rsync-opts
45 Use this option to give rsync options with. See rsync(1) for
46 available options. Only "--" options are supported. Write the
47 options without the beginning "--" Can be specified multiple
48 times.
49
51 NONE
52
54 # You can use any source directory
55 __rsync /tmp/testdir \
56 --source /etc
57
58 # Use source from type
59 __rsync /etc \
60 --source "$__type/files/package"
61
62 # Allow multiple __rsync objects to write to the same dir
63 __rsync mystuff \
64 --destination /usr/local/bin \
65 --source "$__type/files/package"
66
67 __rsync otherstuff \
68 --destination /usr/local/bin \
69 --source "$__type/files/package2"
70
71 # Use rsync option --exclude
72 __rsync /tmp/testdir \
73 --source /etc \
74 --rsync-opts exclude=sshd_conf
75
76 # Use rsync with multiple options --exclude --dry-run
77 __rsync /tmp/testing \
78 --source /home/tester \
79 --rsync-opts exclude=id_rsa \
80 --rsync-opts dry-run
81
83 rsync(1)
84
86 Nico Schottelius <nico-cdist--@--schottelius.org>
87
89 Copyright (C) 2015 Nico Schottelius. You can redistribute it and/or
90 modify it under the terms of the GNU General Public License as pub‐
91 lished by the Free Software Foundation, either version 3 of the Li‐
92 cense, or (at your option) any later version.
93
95 ungleich GmbH 2020
96
97
98
99
1006.9.6 Apr 20, 2021 CDIST-TYPE__RSYNC(7)