CDIST-TYPE__DIRECTORY(7)
β¨ NAME β¨
cdist-type__directory(7) β manage a directory π
This is the cdist type that handles directories on the target, bestie. It can create them or remove them.
πΈ DESCRIPTION πΈ
This cdist type allows you to create or remove directories on the target. That's the whole vibe. β¨
π REQUIRED PARAMETERS π
None. Not a single one, bestie β you're free to go off with the optional stuff. π
π OPTIONAL PARAMETERS π
stateβ can be'present','absent','exists'or'pre-exists', and it 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. π
groupβ Group tochgrpto. π«Άmodeβ Unix permissions, suitable forchmod. πownerβ User tochownto. π
π₯ BOOLEAN PARAMETERS π₯
parentsβ Whether to create parents as well (mkdir -pbehaviour). Warning: all intermediate directory permissions default to whatevermkdir -pdoes. Usually this meansroot:root,0700. πrecursiveβ If supplied thechgrpandchowncall will run recursively. This does not influence the behaviour ofchmod. π
π¦ 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 π
Okay bestie, here are the examples, copied exactly so you can steal them:
# 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 β¨
Catch you later, bestie β this was cdist-type__directory(7), from cdist version 7.0.0, dated Jul 31, 2022. Stay slay, stay organized, and may your directories always be exactly where you left them. πβ¨π
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms