2011-03-08 20:47:08 +00:00
|
|
|
cdist-type__file(7)
|
|
|
|
===================
|
2011-03-08 20:27:57 +00:00
|
|
|
Nico Schottelius <nico-cdist--@--schottelius.org>
|
|
|
|
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2011-07-18 11:34:39 +00:00
|
|
|
cdist-type__file - Manage files
|
2011-03-08 20:27:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2012-01-09 15:30:52 +00:00
|
|
|
This cdist type allows you to create files, remove files and set file
|
2011-07-18 11:34:39 +00:00
|
|
|
attributes on the target.
|
2011-03-08 20:27:57 +00:00
|
|
|
|
|
|
|
|
2011-03-08 20:47:08 +00:00
|
|
|
REQUIRED PARAMETERS
|
2011-03-08 20:27:57 +00:00
|
|
|
-------------------
|
2011-03-15 20:13:01 +00:00
|
|
|
None.
|
2011-03-08 20:27:57 +00:00
|
|
|
|
2011-03-08 20:47:08 +00:00
|
|
|
OPTIONAL PARAMETERS
|
|
|
|
-------------------
|
2011-07-18 11:34:39 +00:00
|
|
|
state::
|
|
|
|
'present' or 'absent', defaults to 'present'
|
|
|
|
|
2011-03-14 23:05:38 +00:00
|
|
|
group::
|
|
|
|
Group to chgrp to.
|
|
|
|
|
2011-03-08 20:47:08 +00:00
|
|
|
mode::
|
|
|
|
Unix permissions, suitable for chmod.
|
2011-03-08 20:27:57 +00:00
|
|
|
|
2011-03-14 23:05:38 +00:00
|
|
|
owner::
|
|
|
|
User to chown to.
|
|
|
|
|
2011-03-08 20:47:08 +00:00
|
|
|
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.
|
2011-03-08 20:27:57 +00:00
|
|
|
|
|
|
|
|
2011-03-08 20:47:08 +00:00
|
|
|
EXAMPLES
|
|
|
|
--------
|
2011-03-08 20:27:57 +00:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
2011-03-08 20:47:08 +00:00
|
|
|
# Create /etc/cdist-configured as an empty file
|
2011-03-16 07:45:01 +00:00
|
|
|
__file /etc/cdist-configured
|
2011-07-18 11:34:39 +00:00
|
|
|
# The same thing
|
2012-01-09 14:41:15 +00:00
|
|
|
__file /etc/cdist-configured --state present
|
2011-07-18 11:34:39 +00:00
|
|
|
# Delete existing file
|
2012-01-09 14:41:15 +00:00
|
|
|
__file /etc/cdist-configured --state absent
|
2011-03-08 20:27:57 +00:00
|
|
|
|
2011-03-08 20:47:08 +00:00
|
|
|
# Use __file from another type
|
2012-01-09 14:41:15 +00:00
|
|
|
__file /etc/issue --source "$__type/files/archlinux" --state present
|
2011-03-14 23:05:38 +00:00
|
|
|
|
|
|
|
# Supply some more settings
|
2011-03-16 07:45:01 +00:00
|
|
|
__file /etc/shadow --source "$__type/files/shadow" \
|
2011-07-18 11:34:39 +00:00
|
|
|
--owner root --group shadow --mode 0640 \
|
2012-01-09 14:41:15 +00:00
|
|
|
--state present
|
2011-03-08 20:27:57 +00:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
2011-03-08 20:47:08 +00:00
|
|
|
- cdist-type(7)
|
2011-03-08 20:27:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
COPYING
|
|
|
|
-------
|
2012-01-09 14:41:15 +00:00
|
|
|
Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is
|
2011-03-08 20:27:57 +00:00
|
|
|
granted under the terms of the GNU General Public License version 3 (GPLv3).
|