cdist/cdist/conf/type/__directory/man.rst

102 lines
2.1 KiB
ReStructuredText
Raw Normal View History

cdist-type__directory(7)
========================
NAME
----
cdist-type__directory - Manage a directory
DESCRIPTION
-----------
This cdist type allows you to create or remove directories on the target.
REQUIRED PARAMETERS
-------------------
None.
OPTIONAL PARAMETERS
-------------------
2016-05-20 06:50:56 +00:00
state
'present' or 'absent', defaults to 'present'
2016-05-20 06:50:56 +00:00
group
Group to chgrp to.
2016-05-20 06:50:56 +00:00
mode
Unix permissions, suitable for chmod.
2016-05-20 06:50:56 +00:00
owner
User to chown to.
BOOLEAN PARAMETERS
------------------
2016-05-20 06:50:56 +00:00
parents
Whether to create parents as well (mkdir -p behaviour).
Warning: all intermediate directory permissions default
to whatever mkdir -p does.
Usually this means root:root, 0700.
2016-05-20 06:50:56 +00:00
recursive
If supplied the chgrp and chown call will run recursively.
This does *not* influence the behaviour of chmod.
MESSAGES
--------
2016-05-20 06:50:56 +00:00
chgrp <group>
Changed group membership
2016-05-20 06:50:56 +00:00
chown <owner>
Changed owner
2016-05-20 06:50:56 +00:00
chmod <mode>
Changed mode
2016-05-20 06:50:56 +00:00
create
Empty directory was created
2016-05-20 06:50:56 +00:00
remove
Directory exists, but state is absent, directory will be removed by generated code.
2016-05-20 06:50:56 +00:00
remove non directory
2016-05-05 07:58:35 +00:00
Something other than a directory with the same name exists and was removed prior to create.
EXAMPLES
--------
2016-05-20 06:50:56 +00:00
.. code-block:: sh
2016-05-20 06:50:56 +00:00
# A silly example
__directory /tmp/foobar
2016-05-20 06:50:56 +00:00
# Remove a directory
__directory /tmp/foobar --state absent
2016-05-20 06:50:56 +00:00
# Ensure /etc exists correctly
__directory /etc --owner root --group root --mode 0755
2016-05-20 06:50:56 +00:00
# Create nfs service directory, including parents
__directory /home/services/nfs --parents
2016-05-20 06:50:56 +00:00
# Change permissions recursively
__directory /home/services --recursive --owner root --group root
2016-05-20 06:50:56 +00:00
# Setup a temp directory
__directory /local --mode 1777
2016-05-20 06:50:56 +00:00
# Take it all
__directory /home/services/kvm --recursive --parents \
--owner root --group root --mode 0755 --state present
AUTHORS
-------
Nico Schottelius <nico-cdist--@--schottelius.org>
COPYING
-------
2016-08-10 16:15:54 +00:00
Copyright \(C) 2011 Nico Schottelius. You can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.