Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
cdist
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
41
Issues
41
List
Boards
Labels
Service Desk
Milestones
Merge Requests
13
Merge Requests
13
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ungleich-public
cdist
Commits
f22349ce
Commit
f22349ce
authored
Dec 06, 2019
by
Darko Poljak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix documentation for install types
Fixes gitlab
#790
.
parent
320f962e
Pipeline
#474
passed with stage
in 1 minute and 3 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
216 additions
and
3 deletions
+216
-3
cdist/conf/type/__install_directory/man.rst
cdist/conf/type/__install_directory/man.rst
+101
-1
cdist/conf/type/__install_directory/man.rst
cdist/conf/type/__install_directory/man.rst
+101
-1
cdist/conf/type/__install_file/man.rst
cdist/conf/type/__install_file/man.rst
+13
-1
docs/changelog
docs/changelog
+1
-0
No files found.
cdist/conf/type/__install_directory/man.rst
deleted
120000 → 0
View file @
320f962e
../__directory/man.rst
\ No newline at end of file
cdist/conf/type/__install_directory/man.rst
0 → 100644
View file @
f22349ce
cdist-type__install_directory(7)
================================
NAME
----
cdist-type__install_directory - Manage a directory with install command
DESCRIPTION
-----------
This cdist type allows you to create or remove directories on the target.
REQUIRED PARAMETERS
-------------------
None.
OPTIONAL PARAMETERS
-------------------
state
'present' or 'absent', defaults to 'present'
group
Group to chgrp to.
mode
Unix permissions, suitable for chmod.
owner
User to chown to.
BOOLEAN PARAMETERS
------------------
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.
recursive
If supplied the chgrp and chown call will run recursively.
This does *not* influence the behaviour of chmod.
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
--------
.. code-block:: sh
# A silly example
__install_directory /tmp/foobar
# Remove a directory
__install_directory /tmp/foobar --state absent
# Ensure /etc exists correctly
__install_directory /etc --owner root --group root --mode 0755
# Create nfs service directory, including parents
__install_directory /home/services/nfs --parents
# Change permissions recursively
__install_directory /home/services --recursive --owner root --group root
# Setup a temp directory
__install_directory /local --mode 1777
# Take it all
__install_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.
cdist/conf/type/__install_file/man.rst
View file @
f22349ce
...
...
@@ -23,6 +23,10 @@ symlink
directory
replace it with the source file
One exception is that when state is pre-exists, an error is raised if
the file would have been created otherwise (e.g. it is not present or
not a regular file).
In any case, make sure that the file attributes are as specified.
...
...
@@ -33,7 +37,7 @@ None.
OPTIONAL PARAMETERS
-------------------
state
'present', 'absent'
or '
exists', defaults to 'present' where:
'present', 'absent'
, 'exists' or 'pre-
exists', defaults to 'present' where:
present
the file is exactly the one from source
...
...
@@ -41,6 +45,9 @@ state
the file does not exist
exists
the file from source but only if it doesn't already exist
pre-exists
check that the file exists and is a regular file, but do not
create or modify it
group
Group to chgrp to.
...
...
@@ -56,6 +63,9 @@ source
If not supplied, an empty file or directory will be created.
If source is '-' (dash), take what was written to stdin as the file content.
onchange
The code to run if file is modified.
MESSAGES
--------
chgrp <group>
...
...
@@ -93,6 +103,8 @@ EXAMPLES
__install_file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \
--state exists \
--owner frodo --mode 0600
# Check that the file is present, show an error when it is not
__install_file /etc/somefile --state pre-exists
# Take file content from stdin
__install_file /tmp/whatever --owner root --group root --mode 644 --source - << DONE
Here goes the content for /tmp/whatever
...
...
docs/changelog
View file @
f22349ce
...
...
@@ -3,6 +3,7 @@ Changelog
next:
* Type __package_update_index: Fix Alpine part (Dominique Roux)
* Documentation: Fix man pages for install types (Darko Poljak)
6.2.0: 2019-11-30
* Core: Redefine/reimplement/fix CDIST_ORDER_DEPENDENCY (Darko Poljak)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment