|
|
|
@ -39,6 +39,7 @@ owner:: |
|
|
|
|
source:: |
|
|
|
|
If supplied, copy this file from the host running cdist to the target. |
|
|
|
|
If not supplied, an empty file or directory will be created. |
|
|
|
|
If source is '-' (dash), take what was written to stdin as the file content. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EXAMPLES |
|
|
|
@ -64,6 +65,12 @@ __file /etc/shadow --source "$__type/files/shadow" \ |
|
|
|
|
__file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \ |
|
|
|
|
--state exists \ |
|
|
|
|
--owner frodo --mode 0600 |
|
|
|
|
|
|
|
|
|
# Take file content from stdin |
|
|
|
|
__file /tmp/whatever --owner root --group root --mode 644 --source - << DONE |
|
|
|
|
Here goes the content for /tmp/whatever |
|
|
|
|
DONE |
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|