cdist-type__directory - Manage a directory
This cdist type allows you to create or remove directories on the target.
14.35.3. REQUIRED PARAMETERS¶
14.35.4. OPTIONAL PARAMETERS¶
- 'present' or 'absent', defaults to 'present'
- Group to chgrp to.
- Unix permissions, suitable for chmod.
- User to chown to.
14.35.5. BOOLEAN PARAMETERS¶
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.
- If supplied the chgrp and chown call will run recursively. This does not influence the behaviour of chmod.
- chgrp <group>
- Changed group membership
- chown <owner>
- Changed owner
- chmod <mode>
- Changed mode
- Empty directory was created
- 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.
# 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
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.