1CDIST-TYPE__DOT_FILE(7)              cdist             CDIST-TYPE__DOT_FILE(7)
2
3
4

NAME

6       cdist-type__dot_file - install file under user's home directory
7

DESCRIPTION

9       This  type  installs a file (=__object_id) under user's home directory,
10       providing a way to install per-user configuration files. File owner and
11       group is deduced from user, for who file is installed.
12
13       Unlike regular __file type, you do not need make any assumptions, where
14       user's home directory is.
15

REQUIRED PARAMETERS

17       user   User, for who file is installed
18

OPTIONAL PARAMETERS

20       dirmode
21              forwarded to __directory type as mode
22
23       mode   forwarded to __file type
24
25       state  forwarded to __file type
26
27       source forwarded to __file type
28
29       file   forwarded to __file type This can be used if multiple users need
30              to have a dotfile updated, which will result in duplicate object
31              id errors. When using the file parameter the object  id  can  be
32              some unique value.
33

MESSAGES

35       This type inherits all messages from file type, and do not add any new.
36

EXAMPLES

38          # Install .forward file for user 'alice'. Since state is 'present',
39          # user is not meant to edit this file, all changes will be overridden.
40          # It is good idea to put warning about it in file itself.
41          __dot_file .forward --user alice --source "$__files/forward"
42
43          # Install .muttrc for user 'bob', if not already present. User can safely
44          # edit it, his changes will not be overwritten.
45          __dot_file .muttrc --user bob --source "$__files/recommended_mutt_config" --state exists
46
47
48          # Install default xmonad config for user 'eve'. Parent directory is created automatically.
49          __dot_file .xmonad/xmonad.hs --user eve --state exists --source "$__files/xmonad.hs"
50
51          # install .vimrc for root and some users
52          for user in root userx usery userz; do
53              __dot_file "${user}_dot_vimrc" \
54                  --user $user \
55                  --file .vimrc \
56                  --state exists \
57                  --source "$__files/$user/.vimrc"
58          done
59

SEE ALSO

61       cdist-type__file(7)
62

COPYING

64       Copyright (C) 2015 Dmitry Bogatov. Free use of this software is granted
65       under the terms of the GNU General Public License version  3  or  later
66       (GPLv3+).
67
69       ungleich GmbH 2021
70
71
72
73
747.0.0                            Jul 31, 2022          CDIST-TYPE__DOT_FILE(7)
Impressum