CDIST-TYPE__DIRECTORY(7) | cdist | 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¶
- state
- 'present', 'absent', 'exists' or 'pre-exists', defaults to 'present' where:
- present
- the directory exists and the given attributes are set.
- absent
- the directory does not exist.
- exists
- the directory exists, but its attributes are not altered if it already existed.
- pre-exists
- check that the directory exists and is indeed a directory, but do not create or modify it.
BOOLEAN PARAMETERS¶
MESSAGES¶
- chgrp <group>
- Changed group membership
- chown <owner>
- Changed owner
- chmod <mode>
- Changed mode
- create
- Empty directory was created
- remove
- Directory exists, but state is absent, directory will be removed by generated code.
- remove non directory
- Something other than a directory with the same name exists and was removed prior to create.
EXAMPLES¶
# A silly example __directory /tmp/foobar # Remove a directory __directory /tmp/foobar --state absent # Ensure /etc exists correctly __directory /etc --owner root --group root --mode 0755 # Create nfs service directory, including parents __directory /home/services/nfs --parents # Change permissions recursively __directory /home/services --recursive --owner root --group root # Setup a temp directory __directory /local --mode 1777 # 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¶
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.
COPYRIGHT¶
ungleich GmbH 2021
September 11, 2024 | 7.0.0 |