diff --git a/software/cdist/man/cdist-best-practice.html b/software/cdist/man/cdist-best-practice.html index fad2bfc8..143b8a8c 100644 --- a/software/cdist/man/cdist-best-practice.html +++ b/software/cdist/man/cdist-best-practice.html @@ -1,6 +1,6 @@ -
Table of Contents
It is recommended to run cdist with public key authentication. +
Table of Contents
It is recommended to run cdist with public key authentication. This requires a private/public key pair and the entry "PermitRootLogin without-password" in the sshd server. See sshd_config(5) and ssh-keygen(1).
When connecting to a new host, the initial delay with ssh connections diff --git a/software/cdist/man/cdist-code-run-all.html b/software/cdist/man/cdist-code-run-all.html index 724c8275..42712eb7 100644 --- a/software/cdist/man/cdist-code-run-all.html +++ b/software/cdist/man/cdist-code-run-all.html @@ -1,6 +1,6 @@ -
Table of Contents
Table of Contents
Table of Contents
cdist-code-run executes generated code from a given OBJECT. +
Table of Contents
cdist-code-run executes generated code from a given OBJECT. The OBJECT must be located below OBJECT_DIR. TYPE must be either local or remote and determines which code part is to be executed.
Table of Contents
Cdist-config is sourced by cdist programs and provides hints on where to find +
Table of Contents
Cdist-config is sourced by cdist programs and provides hints on where to find types, manifests, etc. Generally speaking, it’s just usable from within the core and is only of interest for cdist-developers.
Table of Contents
Deploy configurations to the specified host, as configured in the initial +
Table of Contents
Deploy configurations to the specified host, as configured in the initial manifest. This script triggers the execution of several other scripts, in so called stages. It is intented to run either from the command line or from cron.
If the environment variable cdist_conf_dir is not set, the
configuration is read from /etc/cdist. The local output directory can
diff --git a/software/cdist/man/cdist-dir.html b/software/cdist/man/cdist-dir.html
index fcdeff0e..04720a51 100644
--- a/software/cdist/man/cdist-dir.html
+++ b/software/cdist/man/cdist-dir.html
@@ -1,6 +1,6 @@
- Table of Contents cdist-dir either pushes a local directory to the target host
+ Table of Contents cdist-dir either pushes a local directory to the target host
or pulls a remote directory from a target host to the local host. In the push case SRC_DIR is local, in the pull case remote.
In the push case DST_DIR is remote, in the pull case local. cdist-dir does not cleanup DST_DIR and thus it may contain old
stuff if used multiple times. cdist-dir does not rely on rsync or other high level tools, because
diff --git a/software/cdist/man/cdist-env.html b/software/cdist/man/cdist-env.html
index 550bd450..9a2345ce 100644
--- a/software/cdist/man/cdist-env.html
+++ b/software/cdist/man/cdist-env.html
@@ -1,6 +1,6 @@
- Table of Contents cdist-env outputs two strings suitable for usage in your current shell,
+ Table of Contents cdist-env outputs two strings suitable for usage in your current shell,
so you can use cdist from the checkout. cdist-env essentially helps you
to easily setup PATH and MANPATH. If you’ve multiple checkouts of cdist and run cdist-env from the various
checkouts, a new run will prepend the last directory, thus ensures you
diff --git a/software/cdist/man/cdist-explorer-run-global.html b/software/cdist/man/cdist-explorer-run-global.html
index dae4342c..5fb6e080 100644
--- a/software/cdist/man/cdist-explorer-run-global.html
+++ b/software/cdist/man/cdist-explorer-run-global.html
@@ -1,6 +1,6 @@
- Table of Contents Transfer the global explorers to HOSTNAME, execute them and transfer
+ Table of Contents Transfer the global explorers to HOSTNAME, execute them and transfer
back the results. Table of Contents Explorer are small shell scripts, which will be executed on the target
+ Table of Contents Explorer are small shell scripts, which will be executed on the target
host. The aim of the explorer is to give hints to types on how to act on the
target system. An explorer outputs the result to stdout, which is usually
a one liner, but may be empty or multi line especially in the case of
diff --git a/software/cdist/man/cdist-hacker.html b/software/cdist/man/cdist-hacker.html
index 0d8a6d7b..20f88b6a 100644
--- a/software/cdist/man/cdist-hacker.html
+++ b/software/cdist/man/cdist-hacker.html
@@ -1,6 +1,6 @@
- Table of Contents Welcome dear hacker! I invite you to a tour of pointers to
+ Table of Contents Welcome dear hacker! I invite you to a tour of pointers to
get into the usable configuration mangament system, cdist. The first thing to know is probably that cdist is brought to
you by people who care about how code looks like and who think
twice before merging or implementing a feature: Less features
diff --git a/software/cdist/man/cdist-manifest-run-all.html b/software/cdist/man/cdist-manifest-run-all.html
index 82daf2db..48bf1ed4 100644
--- a/software/cdist/man/cdist-manifest-run-all.html
+++ b/software/cdist/man/cdist-manifest-run-all.html
@@ -1,6 +1,6 @@
- Table of Contents cdist-manifest-run-all iterates over every existing object and
+ Table of Contents cdist-manifest-run-all iterates over every existing object and
executes the manifest of its type. Table of Contents cdist-manifest-run-init executes the initial manifest, which creates
+ Table of Contents cdist-manifest-run-init executes the initial manifest, which creates
the first objects. Table of Contents cdist-manifest-run executes the given MANIFEST and saves the output into
+ Table of Contents Table of Contents Manifests exist to define which configurations should be applied to a specific
+ Table of Contents Manifests exist to define which configurations should be applied to a specific
host as well as to define which configurations should be applied within a
type. Manifests are executed locally and the resulting objects are stored in
an internal database. The same object can be redefined in multiple different manifests as long as
diff --git a/software/cdist/man/cdist-object-explorer-all.html b/software/cdist/man/cdist-object-explorer-all.html
index d27d2da5..782e485d 100644
--- a/software/cdist/man/cdist-object-explorer-all.html
+++ b/software/cdist/man/cdist-object-explorer-all.html
@@ -1,6 +1,6 @@
- Table of Contents For every object, it checks whether the type has one or more explorers.
+ Table of Contents For every object, it checks whether the type has one or more explorers.
If so, the explorers of the type are copied to the target and executed
once per object. Table of Contents Table of Contents Table of Contents For the given object, run the gencode executable. The output of this
+ Table of Contents For the given object, run the gencode executable. The output of this
executable on stdout will be used by cdist-object-gencode-all(1). Table of Contents cdist-quickstart is an interactive guide to cdist. It should be one
+ Table of Contents cdist-quickstart is an interactive guide to cdist. It should be one
of the first tools you use when you begin with cdist. To use cdist-quickstart, add the bin directory to your PATH, execute
cdist-quickstart and enjoy cdist: Various scripts which are not in the core need information on how
+ Various scripts which are not in the core need information on how
to find information. This manpage summarises the available environment
variables, types and paths and clearifies with part may access which variables. If not specified otherwise, all paths are relative to the checkout directory. Table of Contents cdist-remote-explorer-run is executed on the target.
+ Table of Contents cdist-remote-explorer-run is executed on the target.
It sets up the variable VARIABLE_NAME to point to the given
EXPLORER_DIR and runs all explorer found in EXPLORER_DIR.
The output of every run explorer is saved into OUT_DIR. Table of Contents cdist-run-remote runs the given executable on the remote host.
+ Table of Contents cdist-run-remote runs the given executable on the remote host.
It ensures PATH is setup correctly on the target side. Table of Contents Starting the execution of deployment with cdist-deploy-to(1), cdist passes
+ Table of Contents Starting the execution of deployment with cdist-deploy-to(1), cdist passes
through different stages, each can be triggered and debugged on its own.
Reading the source of the cdist-deploy-to executable shous the scripts
responsible for each stage. Before running the user facing stages, cdist prepares the target host
diff --git a/software/cdist/man/cdist-type-build-emulation.html b/software/cdist/man/cdist-type-build-emulation.html
index 97edf165..93f177be 100644
--- a/software/cdist/man/cdist-type-build-emulation.html
+++ b/software/cdist/man/cdist-type-build-emulation.html
@@ -1,6 +1,6 @@
- Table of Contents cdist-type-build-emulation creates a link to cdist-type-emulator
+ Table of Contents cdist-type-build-emulation creates a link to cdist-type-emulator
for every TYPE. These links are placed in a OUT_DIR, which
is prepended into $PATH. This way the user can use TYPE in the
manifests like any other executable. Table of Contents cdist-type-emulator is normally called through a link to it of the
+ Table of Contents cdist-type-emulator is normally called through a link to it of the
name of a specifc type. It saves the given parameters into
a parameters directory and the requirements into a require file. It checks whether the parameters are valid: Table of Contents cdist-type-template creates a new type and adds the usual files to it.
+ Table of Contents cdist-type-template creates a new type and adds the usual files to it.
It is thought to be helpful when writing new types. Table of Contents __TYPE ID --parameter value [--parameter value …] __TYPE --parameter value [--parameter value …] (for singletons) Types are the main component of cdist and define functionality. If you
+ Table of Contents __TYPE ID --parameter value [--parameter value …] __TYPE --parameter value [--parameter value …] (for singletons) Types are the main component of cdist and define functionality. If you
use cdist, you’ll write a type for every functionality you would like
to use. You can use types from the initial manifest or the type manifest like a
normal command: Table of Contents This type can be used to check a file for existence of a
+specific line and adding it, if it was not found. Table of Contents Table of Contents Table of Contents Table of Contents Table of Contents Table of Contents Table of Contents This cdist type allows you to hard and symoblic links. The given
+object id is the destination for the link. Table of Contents Table of Contents This cdist type allows you to install or uninstall packages on the target.
+It dispatches the actual work to the package system dependant types. Table of Contents Table of Contents Table of Contents This type can be used to check a file for existence of a
+specific line and removeing it, if it was found. Table of Contents Table of Contents Cdist is a very simple, elegant, cleanly designed configuration management
+ Table of Contents Cdist is a very simple, elegant, cleanly designed configuration management
system. The easiest way to get started with cdist is to run cdist-quickstart. Cdist configurations are written in the shell scripting language.
The mapping of configurations to hosts is defined in so called manifests,
logical units of functionality are called "types" in cdist jargon.
# Bourne shell example
export PATH=$(pwd -P)/bin:$PATH
diff --git a/software/cdist/man/cdist-reference.html b/software/cdist/man/cdist-reference.html
index bade6589..66632c6c 100644
--- a/software/cdist/man/cdist-reference.html
+++ b/software/cdist/man/cdist-reference.html
@@ -1,6 +1,6 @@
-
# Creates empty file /etc/cdist-configured
diff --git a/software/cdist/man/cdist-type__addifnosuchline.html b/software/cdist/man/cdist-type__addifnosuchline.html
new file mode 100644
index 00000000..a07305b9
--- /dev/null
+++ b/software/cdist/man/cdist-type__addifnosuchline.html
@@ -0,0 +1,20 @@
+
+
+
# Creates or appends the line specifiend in "include_www" to the file "lighttpd.conf"
+__addifnosuchline www --file /etc/lighttpd.conf --line include_www
+
+# Adds the line "include_git" to the file "lighttpd.conf"
+__addifnosuchline /etc/lighttpd.conf --line include_git
# Enable a ppa repository
+__apt_ppa ppa:sans-intern/missing-bits --state enabled
+
+# Disable a ppa repository
+__apt_ppa ppa:sans-intern/missing-bits --state disabled
# A silly example
+__directory /tmp/foobar
+
+# Ensure /etc exists correctly
+__directory /etc --owner root --group root --mode 0755
+
+# Create nfs service directory, including parents
+__directory /home/services/nfs --parents yes
+
+# Change permissions recursively
+__directory /home/services --recursive yes --owner root --group root
# Create /etc/cdist-configured as an empty file
+__file /etc/cdist-configured
+
+# Use __file from another type
+__file /etc/issue --source "$__type/files/archlinux"
+
+# Supply some more settings
+__file /etc/shadow --source "$__type/files/shadow" \
+ --owner root --group shadow --mode 0640
# Create a group 'foobar' with operating system default settings
+__group foobar
+
+# Same but with a specific gid
+__group foobar --gid 1234
+
+# Same but with a gid and password
+__group foobar --gid 1234 --password 'crypted-password-string'
__issue
+
+# When called from another type
+__issue --source "$__type/files/myfancyissue"
# Set the maximum system user id
+__key_value SYS_UID_MAX --file /etc/login.defs --value 666 --delimiter ' '
+
+# Same with fancy id
+__key_value my-fancy-id --file /etc/login.defs --key SYS_UID_MAX --value 666 \
+ --delimiter ' '
+
+# Enable packet forwarding
+__key_value net.ipv4.ip_forward --file /etc/sysctl.conf --value 1 \
+ --delimiter '='
# Create hard link of /etc/shadow
+__link /root/shadow --source /etc/shadow --type hard
+
+# Relative symbolic link
+__link /etc/apache2/sites-enabled/www.test.ch \
+ --source ../sites-available/www.test.ch \
+ --type symbolic
+
+# Absolute symbolic link
+__link /opt/plone --source /home/services/plone --type symbolic
# Use cdist defaults
+__motd
+
+# Supply source file from a different type
+__motd --source "$__type/files/my-motd"
# Install the package vim on the target
+__package vim --state installed
+
+# Same but install specific version
+__package vim --state installed --version 7.3.50
+
+# Force use of a specific package type
+__package vim --state installed --type __package_apt
# Ensure zsh in installed
+__package_apt zsh --state installed
+
+# In case you only want *a* webserver, but don't care which one
+__package_apt webserver --state installed --name nginx
+
+# Install package with defaults (from a type)
+__package_apt postfix --state installed --preseed "$__type/files/postfix-seed"
+
+# Remove obsolete package
+__package_apt puppet --state deinstalled
# Ensure zsh in installed
+__package_pacman zsh --state installed
+
+# If you don't want to follow pythonX packages, but always use python
+__package_pacman python --state installed --name python2
+
+# Remove obsolete package
+__package_pacman puppet --state deinstalled
# Removes the line specifiend in "include_www" from the file "lighttpd.conf"
+__removeline www --file /etc/lighttpd.conf --line include_www
+
+# Removes the line "include_git" from the file "lighttpd.conf"
+__removeline /etc/lighttpd.conf --line include_git
# Create user account for foobar with operating system default settings
+__user foobar
+
+# Same but with a different shell
+__user foobar --shell /bin/zsh
+
+# Set explicit uid and home
+__user foobar --uid 1001 --shell /bin/zsh --home /home/foobar