diff --git a/software/cdist.mdwn b/software/cdist.mdwn index 6e46db87..2aab45c1 100644 --- a/software/cdist.mdwn +++ b/software/cdist.mdwn @@ -37,6 +37,11 @@ it ticks differently: * cdist is written in POSIX shell * No special requirements like high level interpreters needed on server or target +### Documentation + +The cdist documentation is included as manpages in the distribution. +You can [browse them online](man) as well. + ### Architecture * Push mode (server pushes configuration) @@ -129,8 +134,8 @@ may vanish at any point. To select a specific branch use # Generic code git checkout -b origin/ - # Stay on version 1.1 - git checkout -b 1.2 origin/1.2 + # Stay on a specific version + git checkout -b 1.3 origin/1.3 ### Mirrors @@ -151,6 +156,10 @@ If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. The master branch on the other hand is the development branch and may not be working, break your setup or eat the tree in your garden. +### Upgrading from 1.2 to 1.3 + +Rename **gencode** of every type to **gencode-remote**. + ### Upgrading from 1.1 to 1.2 No incompatiblities. diff --git a/software/cdist/man/cdist-code-run-all.html b/software/cdist/man/cdist-code-run-all.html new file mode 100644 index 00000000..138c9dac --- /dev/null +++ b/software/cdist/man/cdist-code-run-all.html @@ -0,0 +1,635 @@ + + + + + +cdist-code-run-all(1) + + + + + +
+
+

NAME

+
+

cdist-code-run-all - Execute all generated code on the target

+
+
+
+

SYNOPSIS

+
+

cdist-code-run-all HOSTNAME

+
+
+
+

DESCRIPTION

+
+

cdist-code-run-all is just a wrapper for cdist-remote-code-run-all.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-remote-code-run-all(1) +

    +
  • +
  • +

    +cdist-run-remote(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-code-run.html b/software/cdist/man/cdist-code-run.html new file mode 100644 index 00000000..84fb6354 --- /dev/null +++ b/software/cdist/man/cdist-code-run.html @@ -0,0 +1,633 @@ + + + + + +cdist-code-run(1) + + + + + +
+
+

NAME

+
+

cdist-code-run - Run explorer remotely

+
+
+
+

SYNOPSIS

+
+

cdist-code-run OBJECT_DIR OBJECT TYPE

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-object-gencode(1) +

    +
  • +
  • +

    +cdist-object-gencode-all(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-config.html b/software/cdist/man/cdist-config.html new file mode 100644 index 00000000..d24cbd9a --- /dev/null +++ b/software/cdist/man/cdist-config.html @@ -0,0 +1,610 @@ + + + + + +cdist-config(1) + + + + + +
+
+

NAME

+
+

cdist-config - Read basic cdist configuration

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

SEE ALSO

+
+

cdist(7)

+
+
+
+

COPYING

+
+

Copyright (C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-deploy-to.html b/software/cdist/man/cdist-deploy-to.html new file mode 100644 index 00000000..e9bfc81e --- /dev/null +++ b/software/cdist/man/cdist-deploy-to.html @@ -0,0 +1,646 @@ + + + + + +cdist-deploy-to(1) + + + + + +
+
+

NAME

+
+

cdist-deploy-to - Deploy configuration to host

+
+
+
+

SYNOPSIS

+
+

cdist-deploy-to HOSTNAME

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

ENVIRONMENT

+
+

If the environment variable cdist_conf_dir is not set, the +configuration is read from /etc/cdist. The local output directory can +be changed by the variable cdist_local_base_dir. All environment +variables are handled by cdist-config.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-config(1) +

    +
  • +
  • +

    +cdist-reference(7) +

    +
  • +
  • +

    +cdist-stages(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-dir.html b/software/cdist/man/cdist-dir.html new file mode 100644 index 00000000..43c62c70 --- /dev/null +++ b/software/cdist/man/cdist-dir.html @@ -0,0 +1,621 @@ + + + + + +cdist-dir(1) + + + + + +
+
+

NAME

+
+

cdist-dir - Poor man’s directory synchronisation

+
+
+
+

SYNOPSIS

+
+

cdist-dir <push|pull> TARGET_HOST SRC_DIR DST_DIR

+
+
+
+

DESCRIPTION

+
+

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 +it cannot expect its existence on the local or target host.

+
+
+
+

SEE ALSO

+
+

cdist(7)

+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-env.html b/software/cdist/man/cdist-env.html new file mode 100644 index 00000000..6b1750bf --- /dev/null +++ b/software/cdist/man/cdist-env.html @@ -0,0 +1,631 @@ + + + + + +cdist-env(1) + + + + + +
+
+

NAME

+
+

cdist-env - Setup environment for using cdist

+
+
+
+

SYNOPSIS

+
+

cdist-env

+
+
+
+

DESCRIPTION

+
+

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 +can run it multiple times and does what one expects.

+
+
+
+

EXAMPLES

+
+

For use in bourne shell variants (like dash, bash, ksh) as well as +in csh variants (csh, tcsh):

+
+
+
eval `./bin/cdist-env`
+
+

Replace "./" with the checkout directory of cdist.

+
+
+
+

SEE ALSO

+
+

cdist(7)

+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-explorer-run-global.html b/software/cdist/man/cdist-explorer-run-global.html new file mode 100644 index 00000000..a985f1a4 --- /dev/null +++ b/software/cdist/man/cdist-explorer-run-global.html @@ -0,0 +1,626 @@ + + + + + +cdist-explorer-run-global(1) + + + + + +
+
+

NAME

+
+

cdist-explorer-run-global - Run the global explorers

+
+
+
+

SYNOPSIS

+
+

cdist-explorer-run-global HOSTNAME

+
+
+
+

DESCRIPTION

+
+

Transfer the global explorers to HOSTNAME, execute them and transfer +back the results.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-explorer.html b/software/cdist/man/cdist-explorer.html new file mode 100644 index 00000000..df7f1fa9 --- /dev/null +++ b/software/cdist/man/cdist-explorer.html @@ -0,0 +1,662 @@ + + + + + +cdist-explorer(7) + + + + + +
+
+

NAME

+
+

cdist-explorer - Explore the target systems

+
+
+
+

DESCRIPTION

+
+

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 +type explorers.

+

There are general explorers, which are run in an early stage, and +type explorers. Both work almost exactly the same way, with the difference +that the values of the general explorers are stored in a general location and +the type specific below the object.

+

Explorers can reuse other explorers on the target system by calling +$explorer/<explorer_name> (general and type explorer) or +$type_explorer/<explorer name> (type explorer).

+

In case of significant errors, the explorer may exit non-zero and return an +error message on stderr, which will cause the cdist run to abort.

+

You can also use stderr for debugging purposes while developing a new +explorer.

+
+
+
+

EXAMPLES

+
+

A very simple explorer may look like this:

+
+
+
hostname
+
+

Which is in practise the "hostname" explorer.

+

A type explorer, which could check for the status of a package may look like this:

+
+
+
if [ -f "$__object/parameter/name" ]; then
+   name="$(cat "$__object/parameter/name")"
+else
+   name="$__object_id"
+fi
+
+# Except dpkg failing, if package is not known / installed
+dpkg -s "$name" 2>/dev/null || exit 0
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-reference(7) +

    +
  • +
  • +

    +cdist-stages(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-manifest-run-all.html b/software/cdist/man/cdist-manifest-run-all.html new file mode 100644 index 00000000..913354ed --- /dev/null +++ b/software/cdist/man/cdist-manifest-run-all.html @@ -0,0 +1,631 @@ + + + + + +cdist-manifest-run-all(1) + + + + + +
+
+

NAME

+
+

cdist-manifest-run-all - Run manifests of all created types

+
+
+
+

SYNOPSIS

+
+

cdist-manifest-run-all HOSTNAME

+
+
+
+

DESCRIPTION

+
+

cdist-manifest-run-all iterates over every existing object and +executes the manifest of its type.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-manifest-run-init(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-manifest-run-init.html b/software/cdist/man/cdist-manifest-run-init.html new file mode 100644 index 00000000..44f4b9e2 --- /dev/null +++ b/software/cdist/man/cdist-manifest-run-init.html @@ -0,0 +1,631 @@ + + + + + +cdist-manifest-run-init(1) + + + + + +
+
+

NAME

+
+

cdist-manifest-run-init - Run the initial manifest

+
+
+
+

SYNOPSIS

+
+

cdist-manifest-run-init HOSTNAME

+
+
+
+

DESCRIPTION

+
+

cdist-manifest-run-init executes the initial manifest, which creates +the first objects.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-manifest-run-all(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-manifest-run.html b/software/cdist/man/cdist-manifest-run.html new file mode 100644 index 00000000..4ebe3760 --- /dev/null +++ b/software/cdist/man/cdist-manifest-run.html @@ -0,0 +1,636 @@ + + + + + +cdist-manifest-run(1) + + + + + +
+
+

NAME

+
+

cdist-manifest-run - Run a given manifest

+
+
+
+

SYNOPSIS

+
+

cdist-manifest-run HOSTNAME MANIFEST OUTPUT_DIR

+
+
+
+

DESCRIPTION

+
+

cdist-manifest-run executes the given MANIFEST and saves the output into +OUTPUT_DIR.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-manifest-run-all(1) +

    +
  • +
  • +

    +cdist-manifest-run-init(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-manifest.html b/software/cdist/man/cdist-manifest.html new file mode 100644 index 00000000..4272a129 --- /dev/null +++ b/software/cdist/man/cdist-manifest.html @@ -0,0 +1,678 @@ + + + + + +cdist-manifest(7) + + + + + +
+
+

NAME

+
+

cdist-manifest - Define types to be used

+
+
+
+

DESCRIPTION

+
+

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.

+

In general, manifests are used to define which types are used depending +on given conditions

+
+
+
+

EXAMPLE

+
+

The initial manifest may for instance contain the following code:

+
+
+
# Always create this file, so other sysadmins know cdist is used.
+__file /etc/cdist-configured --type file
+
+case "$__target_host" in
+   my.server.name)
+      __file /root/bin/ --type directory
+      __file /etc/issue.net --type file --source "$__manifest/issue.net
+   ;;
+esac
+
+

The manifest of the type "nologin" may look like this:

+
+
+
__file /etc/nologin --type file --source "$__type/files/default.nologin"
+
+
+
+
+

DEPENDENCIES

+
+

If you want to describe that something requires something else, just +setup the variable "require" to contain the requirements. Multiple +requirements can be added white space seperated.

+
+
+
# No dependency
+__file /etc/cdist-configured
+
+# Require above object
+require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \
+   --source /etc/cdist-configured  --type symbolic
+
+# Require two objects
+require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \
+   __file /tmp/cdist-another-testfile
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-manifest-run(1) +

    +
  • +
  • +

    +cdist-manifest-run-all(1) +

    +
  • +
  • +

    +cdist-manifest-run-init(1) +

    +
  • +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-object-explorer-all.html b/software/cdist/man/cdist-object-explorer-all.html new file mode 100644 index 00000000..826c70d5 --- /dev/null +++ b/software/cdist/man/cdist-object-explorer-all.html @@ -0,0 +1,632 @@ + + + + + +cdist-object-explorer-all(1) + + + + + +
+
+

NAME

+
+

cdist-object-explorer-all - Run type explorer for every object

+
+
+
+

SYNOPSIS

+
+

cdist-object-explorer-all HOSTNAME

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-remote-explorer-run(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-object-gencode-all.html b/software/cdist/man/cdist-object-gencode-all.html new file mode 100644 index 00000000..f4267f3f --- /dev/null +++ b/software/cdist/man/cdist-object-gencode-all.html @@ -0,0 +1,635 @@ + + + + + +cdist-object-gencode-all(1) + + + + + +
+
+

NAME

+
+

cdist-object-gencode-all - Generate code for every existing object

+
+
+
+

SYNOPSIS

+
+

cdist-object-gencode-all HOSTNAME

+
+
+
+

DESCRIPTION

+
+

For every object that exists, the cdist-object-gencode is executed.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-code-run(1) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-object-gencode(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-object-gencode.html b/software/cdist/man/cdist-object-gencode.html new file mode 100644 index 00000000..97df5719 --- /dev/null +++ b/software/cdist/man/cdist-object-gencode.html @@ -0,0 +1,636 @@ + + + + + +cdist-object-gencode(1) + + + + + +
+
+

NAME

+
+

cdist-object-gencode - Generate code for a given object

+
+
+
+

SYNOPSIS

+
+

cdist-object-gencode HOSTNAME OBJECT

+
+
+
+

DESCRIPTION

+
+

For the given object, run the gencode executable. The output of this +executable on stdout will be used by cdist-object-gencode-all(1).

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-code-run(1) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-object-gencode-all(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-quickstart.html b/software/cdist/man/cdist-quickstart.html new file mode 100644 index 00000000..fca745ff --- /dev/null +++ b/software/cdist/man/cdist-quickstart.html @@ -0,0 +1,645 @@ + + + + + +cdist-quickstart(1) + + + + + +
+
+

NAME

+
+

cdist-quickstart - Make use of cinit in 5 minutes

+
+
+
+

SYNOPSIS

+
+

cdist-quickstart

+
+
+
+

DESCRIPTION

+
+

cdist-quickstart is an interactive guide to cdist. It should be one +of the first tools you use when you begin with cdist.

+
+
+
+

EXAMPLES

+
+

To use cdist-quickstart, add the bin directory to your PATH, +execute cdist-quickstart and enjoy cdist:

+
+
+
# Bourne shell example
+export PATH=$(pwd -P)/bin:$PATH
+
+# Alternatively, usable for csh and bsh, set's up PATH and MANPATH
+eval `./bin/cdist-env`
+
+# Let's go!
+cdist-quickstart
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-env(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). +## How to use cdist?

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-reference.html b/software/cdist/man/cdist-reference.html new file mode 100644 index 00000000..7b223602 --- /dev/null +++ b/software/cdist/man/cdist-reference.html @@ -0,0 +1,1026 @@ + + + + + +cdist-reference(7) + + + + + +
+
+

NAME

+
+

cdist-reference - Variable, path and type reference for cdist

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

PATHS

+
+

If not specified otherwise, all paths are relative to the checkout directory.

+
+
+conf/ +
+
+

+ Contains the (static) configuration like manifests, types and explorers. +

+
+
+conf/manifest/init +
+
+

+ This is the central entry point used by cdist-manifest-init(1). + It is an executable (+x bit set) shell script that can use + values from the explorers to decide which configuration to create + for the specified target host. +

+
+
+
It should be primary used to define mapping from configurations to hosts.
+
+
+
+conf/manifest/* +
+
+

+ All other files in this directory are not directly used by cdist, but you + can seperate configuration mappings, if you have a lot of code in the + manifest/init file. This may also be very helpful to have different admins + maintain different groups of hosts. +

+
+
+conf/explorer/<name> +
+
+

+ Contains explorers to be run on the target hosts, see cdist-explorer(7). +

+
+
+conf/type/ +
+
+

+ Contains all available types, which are used to provide + some kind of functionality. See cdist-type(7). +

+
+
+conf/type/<name>/ +
+
+

+ Home of the type <name>. +

+
+
+
This directory is referenced by the variable __type (see below).
+
+
+
+conf/type/<name>/man.text +
+
+

+ Manpage in Asciidoc format (nequired for inclusion into upstream) +

+
+
+conf/type/<name>/manifest +
+
+

+ Used to generate additional objects from a type. +

+
+
+conf/type/<name>/gencode-local +
+
+

+ Used to generate code to be executed on the server. +

+
+
+conf/type/<name>/gencode-remote +
+
+

+ Used to generate code to be executed on the client. +

+
+
+conf/type/<name>/parameters/required +
+
+

+ Parameters required by type, \n seperated list. +

+
+
+conf/type/<name>/parameters/optional +
+
+

+ Parameters optionally accepted by type, \n seperated list. +

+
+
+conf/type/<name>/explorer +
+
+

+ Location of the type specific explorers. +

+
+
+
This directory is referenced by the variable __type_explorer (see below).
+
+
+
+
See cdist-explorer(7).
+
+
+
+out/ +
+
+

+ This directory contains output of cdist and is usually located + in a temporary directory and thus will be removed after the run. +

+
+
+
This directory is referenced by the variable __global (see below).
+
+
+
+out/explorer +
+
+

+ Output of general explorers. +

+
+
+out/object +
+
+

+ Objects created for the host. +

+
+
+out/object/<object> +
+
+

+ Contains all object specific information. +

+
+
+
This directory is referenced by the variable __object (see below).
+
+
+
+out/object/<object>/explorers +
+
+

+ Output of type specific explorers, per object. +

+
+
+tmp_dir +
+
+

+ A tempdir and a tempfile is used by cdist internally, + which will be removed when the scripts end automatically. + See cdist-config(1). +

+
+
+
+
+
+

TYPES

+
+

The following types are available:

+
    +
  • +

    +__addifnosuchline +

    +
  • +
  • +

    +__directory +

    +
  • +
  • +

    +__file +

    +
  • +
  • +

    +__group +

    +
  • +
  • +

    +__issue +

    +
  • +
  • +

    +__link +

    +
  • +
  • +

    +__motd +

    +
  • +
  • +

    +__package +

    +
  • +
  • +

    +__package_apt +

    +
  • +
  • +

    +__package_pacman +

    +
  • +
  • +

    +__removeline +

    +
  • +
  • +

    +__user +

    +
  • +
+
+
+
+

VARIABLES

+
+
+
+__explorer +
+
+

+ Directory that contains all explorers. + Available for: explorer +

+
+
+__manifest +
+
+

+ Directory that contains the initial manifest. + Available for: initial manifest +

+
+
+__global +
+
+

+ Directory that contains generic output like explorer. + Available for: initial manifest, type manifest, type explorer, type codegen +

+
+
+__object +
+
+

+ Directory that contains the current object. + Available for: type manifest, type explorer, type codegen +

+
+
+__object_id +
+
+

+ The type unique object id. + Available for: type manifest, type explorer, type codegen +

+
+
+__target_host +
+
+

+ The host we are deploying to. + Available for: initial manifest, type manifest, type codegen +

+
+
+__target_user +
+
+

+ User to use for authentication on remote host. + Currently static in core. +

+
+
+__type +
+
+

+ Path to the current type. + Available for: type manifest +

+
+
+__type_explorers +
+
+

+ Directory that contains the type explorers. + Available for: type explorer +

+
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-type__addifnosuchline(7) +

    +
  • +
  • +

    +cdist-type__directory(7) +

    +
  • +
  • +

    +cdist-type__file(7) +

    +
  • +
  • +

    +cdist-type__group(7) +

    +
  • +
  • +

    +cdist-type__issue(7) +

    +
  • +
  • +

    +cdist-type__link(7) +

    +
  • +
  • +

    +cdist-type__motd(7) +

    +
  • +
  • +

    +cdist-type__package(7) +

    +
  • +
  • +

    +cdist-type__package_apt(7) +

    +
  • +
  • +

    +cdist-type__package_pacman(7) +

    +
  • +
  • +

    +cdist-type__removeline(7) +

    +
  • +
  • +

    +cdist-type__user(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-remote-explorer-run.html b/software/cdist/man/cdist-remote-explorer-run.html new file mode 100644 index 00000000..343e3b7c --- /dev/null +++ b/software/cdist/man/cdist-remote-explorer-run.html @@ -0,0 +1,628 @@ + + + + + +cdist-remote-explorer-run(1) + + + + + +
+
+

NAME

+
+

cdist-remote-explorer-run - Run explorer remotely

+
+
+
+

SYNOPSIS

+
+

cdist-remote-explorer-run VARIABLE_NAME EXPLORER_DIR OUT_DIR

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-explorer-run-global(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-run-remote.html b/software/cdist/man/cdist-run-remote.html new file mode 100644 index 00000000..273de370 --- /dev/null +++ b/software/cdist/man/cdist-run-remote.html @@ -0,0 +1,636 @@ + + + + + +cdist-run-remote(1) + + + + + +
+
+

NAME

+
+

cdist-run-remote - Execute something on the target

+
+
+
+

SYNOPSIS

+
+

cdist-run-remote HOSTNAME EXECUTABLE [ARGUMENTS FOR EXECUTABLE]

+
+
+
+

DESCRIPTION

+
+

cdist-run-remote runs the given executable on the remote host. +It ensures PATH is setup correctly on the target side.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-code-run-all(1) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-remote-code-run-all(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-stages.html b/software/cdist/man/cdist-stages.html new file mode 100644 index 00000000..0724273e --- /dev/null +++ b/software/cdist/man/cdist-stages.html @@ -0,0 +1,713 @@ + + + + + +cdist-stages(7) + + + + + +
+
+

NAME

+
+

cdist-stages - Stages used during configuration deployment

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

STAGE 0: INTERNAL PREPERATION

+
+

Before running the user facing stages, cdist prepares the target host +to contain cdist binaries and creates a clean environment for the +configuration run.

+

Related manpages: + - cdist-bin-transfer(1)

+
+
+
+

STAGE 1: TARGET INFORMATION RETRIEVAL

+
+

In this stage information is collected about the target host using so called +explorers. Every existing explorer is run on the target and the output of all +explorers are copied back into the local cache. The results can be used by +manifests and types.

+

Related manpages: + - cdist-explorer(7)

+
+
+
+

STAGE 2: RUN THE INITIAL MANIFEST

+
+

The initial manifest, which should be used for mappings of hosts to types, +is executed. This stage creates objects in a cconfig database that contains +the objects as defined in the manifest for the specific host. In this stage, +no conflicts may occur, i.e. no object of the same type with the same id may +be created.

+

Related manpages: + - cdist-manifest(7) + - cdist-manifest-run(1) + - cdist-manifest-run-init(1)

+
+
+
+

STAGE 3: EXECUTION OF TYPES

+
+

Every object is checked whether its type has a manifest file. If the type has +a manifest file and it is executable, it will be executed. The manifest script +may generate and change the created objects. In other words, one type can reuse +other types.

+

For instance the object apache/www.test.ch is of type apache, which may +contain a manifest script, which creates new objects of type __file.

+

The newly created objects are merged back into the existing tree. No conflicts +may occur during the merge. A conflict would mean that two different objects +try to create the same object, which indicates a broken configuration.

+

Related manpages: + - cdist-manifest-run(1) + - cdist-manifest-run-all(1) + - cdist-type(7)

+
+
+
+

STAGE 4: CODE GENERATION

+
+

In this stage for every created objects its type is checked whether it has a +gencode script. If the type has a gencode script and it is executable it will +be executed. This executable should create code to be executed on the target +on stdout. If the gencode executable fails, it must print diagnostic messages +on stderr and exit non-zero.

+

Related manpages: + - cdist-gencode(1) + - cdist-gencode-all(1) + - cdist-type(7)

+
+
+
+

STAGE 5: CODE EXECUTION

+
+

The resulting code from the previous stage is transferred to the target host +and executed there to apply the configuration changes,

+

Related manpages: + - cdist-exec-run(1) + - cdist-exec-transfer(1)

+
+
+
+

SUMMARY

+
+

If, and only if, all the stages complete without an errors, the configuration +will be applied to the target. Each stage can also be run individually, though +dependencies for each stage must be fulfilled and thus the stages must be run +in correct order.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-deploy-to(1) +

    +
  • +
  • +

    +cdist-reference(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type-build-emulation.html b/software/cdist/man/cdist-type-build-emulation.html new file mode 100644 index 00000000..7372246d --- /dev/null +++ b/software/cdist/man/cdist-type-build-emulation.html @@ -0,0 +1,628 @@ + + + + + +cdist-type-build-emulation(1) + + + + + +
+
+

NAME

+
+

cdist-type-build-emulation - Build executables for types

+
+
+
+

SYNOPSIS

+
+

cdist-type-build-emulation OUT_DIR

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-type-emulator(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type-emulator.html b/software/cdist/man/cdist-type-emulator.html new file mode 100644 index 00000000..9e3f2ff2 --- /dev/null +++ b/software/cdist/man/cdist-type-emulator.html @@ -0,0 +1,657 @@ + + + + + +cdist-type-emulator(1) + + + + + +
+
+

NAME

+
+

cdist-type-emulator - Emulate type and record parameters and dependencies

+
+
+
+

SYNOPSIS

+
+

cdist-type-emulator [TYPE ARGS]

+
+
+
+

DESCRIPTION

+
+

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:

+
    +
  • +

    +are required parameter given? +

    +
  • +
  • +

    +are all other required parameters specified as optional? +

    +
  • +
+
+
+
+

EXAMPLES

+
+

Your manifest may contain stuff like this:

+
+
+
__addifnosuchline /tmp/linetest --line "test"
+
+__motd
+
+

In both cases, cdist-type-emulator is called instead of a real type. +In the first case, the object id "/tmp/linetest" is recorded and the +parameter "line" stored with the content "test".

+

In the second case, __motd must be decleared as a singleton, as the +object id is missing.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist(7) +

    +
  • +
  • +

    +cdist-type-build-emulation(1) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type-template.html b/software/cdist/man/cdist-type-template.html new file mode 100644 index 00000000..ef169cf2 --- /dev/null +++ b/software/cdist/man/cdist-type-template.html @@ -0,0 +1,615 @@ + + + + + +cdist-type-template(1) + + + + + +
+
+

NAME

+
+

cdist-type-template - Create a new type

+
+
+
+

SYNOPSIS

+
+

cdist-type-template NAME

+
+
+
+

DESCRIPTION

+
+

cdist-type-template creates a new type and adds the usual files to it. +It is thought to be helpful when writing new types.

+
+
+
+

SEE ALSO

+
+

cdist(7)

+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type.html b/software/cdist/man/cdist-type.html new file mode 100644 index 00000000..111b383f --- /dev/null +++ b/software/cdist/man/cdist-type.html @@ -0,0 +1,827 @@ + + + + + +cdist-type(7) + + + + + +
+
+

NAME

+
+

cdist-type - Functionality bundled

+
+
+
+

SYNOPSIS

+
+

__TYPE ID --parameter value [--parameter value …]

+

__TYPE --parameter value [--parameter value …] (for singletons)

+
+
+
+

DESCRIPTION

+
+

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.

+
+
+
+

HOW TO USE A TYPE

+
+

You can use types from the initial manifest or the type manifest like a +normal command:

+
+
+
# Creates empty file /etc/cdist-configured
+__file /etc/cdist-configured --type file
+
+# Ensure tree is installed
+__package tree --state installed
+
+

Internally cdist-type-emulator(1) will be called from cdist-manifest-run(1) to +save the given parameters into a cconfig database, so they can be accessed by +the manifest and gencode scripts of the type (see below).

+

A list of supported types can be found in the cdist-reference(7) manpage.

+
+
+
+

SINGLETON TYPES

+
+

If a type is flagged as a singleton, it may me used only once. This +is useful for types which can be used only once on a system. If a type +can only be used once, it does not take an

+

Example:

+
+
+
# __issue type manages /etc/issue
+__issue
+
+# Probably your own type - singletons may use parameters
+__myfancysingleton --colour green
+
+
+
+
+

HOW TO WRITE A NEW TYPE

+
+

A type consists of

+
    +
  • +

    +parameter (optional) +

    +
  • +
  • +

    +manifest (optional) +

    +
  • +
  • +

    +singleton (optional) +

    +
  • +
  • +

    +explorer (optional) +

    +
  • +
  • +

    +gencode (optional) +

    +
  • +
+

Types are stored below conf/type/. Their name should always be prefixed with +two underscores (__) to prevent collisions with other binaries in $PATH.

+

To begin a new type from a template, execute "cdist-type-template NAME" +and cd conf/type/NAME.

+
+
+
+

DEFINING PARAMETERS

+
+

Every type consists of optional and required parameters, which must +be created in a newline seperated file in parameters/required and +parameters/optional. If either or both missing, the type will have +no required, no optional or no parameters at all.

+

Example:

+
+
+
echo servername >> conf/type/__nginx_vhost/parameter/required
+echo logdirectory >> conf/type/__nginx_vhost/parameter/optional
+
+
+
+
+

WRITING THE MANIFEST

+
+

In the manifest of a type you can use other types, so your type extends +their functionality. A good example is the __package type, which in +a shortened version looks like this:

+
+
+
os="$(cat "$__global/explorer/os")"
+case "$os" in
+      archlinux) type="pacman" ;;
+      debian|ubuntu) type="apt" ;;
+      gentoo) type="emerge" ;;
+      *)
+         echo "Don't know how to manage packages on: $os" >&2
+         exit 1
+      ;;
+esac
+
+__package_$type "$@"
+
+

As you can see, the type can reference different environment variables, +which are documented in cdist-environment-variables(7).

+

Always ensure the manifest is executable, otherwise cdist will not be able +to execute it.

+
+
+
+

SINGLETON - ONLY INSTANCE ONLY

+
+

If you want to ensure that a type can only be used once per target, you can +mark it as a singleton: Just create the (empty) file "singleton" in your type +directory. This will also change the way your type must be called:

+
+
+
__YOURTYPE --parameter value
+
+

As you can see, the ID is omitted, because it does not make any sense, if your +type can be used only once.

+
+
+
+

THE TYPE EXPLORERS

+
+

If a type needs to explore specific details, it can provide type specific +explorers, which will be executed on the target for every created object.

+

The explorers are stored under the "explorer" directory below the type. +It could for instance contain code to check the md5sum of a file on the +client, like this (shortened version from real type __file):

+
+
+
if [ -f "$__object/parameter/destination" ]; then
+   destination="$(cat "$__object/parameter/destination")"
+else
+   destination="/$__object_id"
+fi
+
+if [ -e "$destination" ]; then
+   md5sum < "$destination"
+fi
+
+
+
+
+

WRITING THE GENCODE SCRIPT

+
+

There are two gencode scripts: gencode-local and gencode-remote. +The output of gencode-local is executed locally, whereas +the output of gencode-remote is executed on the target.

+

The gencode script can make use of the parameters, the global explorers +and the type specific explorers. The output (stdout) of this script is +saved by cdist and will be executed on the target.

+

If the gencode script encounters an error, it should print diagnostic +messages to stderr and exit non-zero. If you need to debug the gencode +script, you can write to stderr:

+
+
+
# Debug output to stderr
+echo "My fancy debug line" >&2
+
+# Output to be saved by cdist for execution on the target
+echo "touch /etc/cdist-configured"
+
+
+
+
+

HINTS FOR TYPEWRITERS

+
+

It must be assumed that the target is pretty dumb and thus does not have high +level tools like ruby installed. If a type requires specific tools to be present +on the target, there must be another type that provides this tool and the first +type should create an object of the specific type.

+

If your type wants to save temporay data, that may be used by other types +later on (for instance file), you can save them in the subdirectory +"files" below $object (but you must create it yourself). cdist will not touch +this directory.

+

If your type contains static files, it’s also recommened to place them in +a folder named "files" within the type (again, because cdist guarantees to +never ever touch this folder).

+
+
+
+

HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST

+
+

If you think your type may be useful for others, ensure it works with the +current master branch of cdist and submit the git url containing the type for +inclusion to the mailinglist cdist at cdist — at — l.schottelius.org.

+

Ensure a corresponding manpage named man.text in asciidoc format with +the manpage-name "cdist-type__NAME" is included in the type directory.

+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-manifest-run(1) +

    +
  • +
  • +

    +cdist-stages(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__addifnosuchline.html b/software/cdist/man/cdist-type__addifnosuchline.html new file mode 100644 index 00000000..9d98c10a --- /dev/null +++ b/software/cdist/man/cdist-type__addifnosuchline.html @@ -0,0 +1,659 @@ + + + + + +cdist-type__addifnosuchline(7) + + + + + +
+
+

NAME

+
+

cdist-type__addifnosuchline - Add a line (if not existing already)

+
+
+
+

DESCRIPTION

+
+

This type can be used to check a file for existence of a +specific line and adding it, if it was not found.

+
+
+
+

REQUIRED PARAMETERS

+
+
+
+line +
+
+

+ Specifies the content which shall be added if not existing. +

+
+
+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+file +
+
+

+ If supplied, use this as the destination file. + Otherwise the object_id is used. +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Daniel Roth. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__directory.html b/software/cdist/man/cdist-type__directory.html new file mode 100644 index 00000000..d6a0c4be --- /dev/null +++ b/software/cdist/man/cdist-type__directory.html @@ -0,0 +1,675 @@ + + + + + +cdist-type__directory(7) + + + + + +
+
+

NAME

+
+

cdist-type__directory - Create a directory

+
+
+
+

DESCRIPTION

+
+

This cdist type allows you to create directories on the target.

+
+
+
+

REQUIRED PARAMETERS

+
+

None.

+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+group +
+
+

+ Group to chgrp to. +

+
+
+mode +
+
+

+ Unix permissions, suitable for chmod. +

+
+
+owner +
+
+

+ User to chown to. +

+
+
+parents +
+
+

+ Whether to create parents as well (mkdir -p behaviour). Must be yes or no. +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__file.html b/software/cdist/man/cdist-type__file.html new file mode 100644 index 00000000..720a3b9a --- /dev/null +++ b/software/cdist/man/cdist-type__file.html @@ -0,0 +1,677 @@ + + + + + +cdist-type__file(7) + + + + + +
+
+

NAME

+
+

cdist-type__file - Create files

+
+
+
+

DESCRIPTION

+
+

This cdist type allows you to create files on the target.

+
+
+
+

REQUIRED PARAMETERS

+
+

None.

+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+group +
+
+

+ Group to chgrp to. +

+
+
+mode +
+
+

+ Unix permissions, suitable for chmod. +

+
+
+owner +
+
+

+ User to chown to. +

+
+
+source +
+
+

+ If supplied, copy this file from the host running cdist to the target. + If not supplied, an empty file or directory will be created. +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__group.html b/software/cdist/man/cdist-type__group.html new file mode 100644 index 00000000..bf3a5a92 --- /dev/null +++ b/software/cdist/man/cdist-type__group.html @@ -0,0 +1,659 @@ + + + + + +cdist-type__group(7) + + + + + +
+
+

NAME

+
+

cdist-type__group - Manage groups

+
+
+
+

DESCRIPTION

+
+

This cdist type allows you to create or modify groups on the target.

+
+
+
+

REQUIRED PARAMETERS

+
+

None.

+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+gid +
+
+

+ see groupmod(8) +

+
+
+password +
+
+

+ see above +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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'
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__issue.html b/software/cdist/man/cdist-type__issue.html new file mode 100644 index 00000000..f8b51005 --- /dev/null +++ b/software/cdist/man/cdist-type__issue.html @@ -0,0 +1,647 @@ + + + + + +cdist-type__issue(7) + + + + + +
+
+

NAME

+
+

cdist-type__issue - Manage issue

+
+
+
+

DESCRIPTION

+
+

This cdist type allows you to easily setup /etc/issue.

+
+
+
+

REQUIRED PARAMETERS

+
+

None.

+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+source +
+
+

+ If supplied, use this file as /etc/issue instead of default. +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
__issue
+
+# When called from another type
+__issue --source "$__type/files/myfancyissue"
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__link.html b/software/cdist/man/cdist-type__link.html new file mode 100644 index 00000000..aa9dac74 --- /dev/null +++ b/software/cdist/man/cdist-type__link.html @@ -0,0 +1,662 @@ + + + + + +cdist-type__link(7) + + + + + +
+
+

NAME

+
+

cdist-type__link - Create links

+
+
+
+

DESCRIPTION

+
+

This cdist type allows you to hard and symoblic links. The given +object id is the destination for the link.

+
+
+
+

REQUIRED PARAMETERS

+
+
+
+source +
+
+

+ Specifies the link source. +

+
+
+type +
+
+

+ Specifies the link type: Either hard or symoblic. +

+
+
+
+
+
+

OPTIONAL PARAMETERS

+
+

None.

+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__motd.html b/software/cdist/man/cdist-type__motd.html new file mode 100644 index 00000000..f3024cef --- /dev/null +++ b/software/cdist/man/cdist-type__motd.html @@ -0,0 +1,649 @@ + + + + + +cdist-type__motd(7) + + + + + +
+
+

NAME

+
+

cdist-type__motd - Manage message of the day

+
+
+
+

DESCRIPTION

+
+

This cdist type allows you to easily setup /etc/motd.

+
+
+
+

REQUIRED PARAMETERS

+
+

None.

+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+source +
+
+

+ If supplied, copy this file from the host running cdist to the target. + If not supplied, a default message will be placed onto the target. +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# Use cdist defaults
+__motd
+
+# Supply source file from a different type
+__motd --source "$__type/files/my-motd"
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__package.html b/software/cdist/man/cdist-type__package.html new file mode 100644 index 00000000..02975a1a --- /dev/null +++ b/software/cdist/man/cdist-type__package.html @@ -0,0 +1,682 @@ + + + + + +cdist-type__user(7) + + + + + +
+
+

NAME

+
+

cdist-type__package - Manage packages

+
+
+
+

DESCRIPTION

+
+

This cdist type allows you to install or uninstall packages on the target. +It dispatches the actual work to the package system dependant types.

+
+
+
+

REQUIRED PARAMETERS

+
+
+
+state +
+
+

+ The state the package should be in, either "installed" or "uninstalled" +

+
+
+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+name +
+
+

+ The name of the package to install. Default is to use the object_id as the + package name. +

+
+
+version +
+
+

+ The version of the package to install. Default is to install the version + choosen by the local package manager. +

+
+
+type +
+
+

+ The package type to use. Default is determined based on the $os explorer + variable. + e.g. package_apt for Debian + package_emerge for Gentoo +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__package_apt.html b/software/cdist/man/cdist-type__package_apt.html new file mode 100644 index 00000000..8762c13e --- /dev/null +++ b/software/cdist/man/cdist-type__package_apt.html @@ -0,0 +1,677 @@ + + + + + +cdist-type__package_apt(7) + + + + + +
+
+

NAME

+
+

cdist-type__package_apt - Manage packages with apt-get

+
+
+
+

DESCRIPTION

+
+

apt-get is usually used on Debian and variants (like Ubuntu) to +manage packages.

+
+
+
+

REQUIRED PARAMETERS

+
+
+
+state +
+
+

+ Either "installed" or "deinstalled". +

+
+
+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+name +
+
+

+ If supplied, use the name and not the object id as the package name. +

+
+
+preseed +
+
+

+ If supplied, use the given filename as input for debconf-set-selections(1) +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
  • +

    +cdist-type__package(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__package_pacman.html b/software/cdist/man/cdist-type__package_pacman.html new file mode 100644 index 00000000..08893829 --- /dev/null +++ b/software/cdist/man/cdist-type__package_pacman.html @@ -0,0 +1,666 @@ + + + + + +cdist-type__package_pacman(7) + + + + + +
+
+

NAME

+
+

cdist-type__package_pacman - Manage packages with pacman

+
+
+
+

DESCRIPTION

+
+

Pacman is usually used on the Archlinux distribution to manage +packages.

+
+
+
+

REQUIRED PARAMETERS

+
+
+
+state +
+
+

+ Either "installed" or "deinstalled". +

+
+
+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+name +
+
+

+ If supplied, use the name and not the object id as the package name. +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
  • +

    +cdist-type__package(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__removeline.html b/software/cdist/man/cdist-type__removeline.html new file mode 100644 index 00000000..007b4aaf --- /dev/null +++ b/software/cdist/man/cdist-type__removeline.html @@ -0,0 +1,659 @@ + + + + + +cdist-type__removeline(7) + + + + + +
+
+

NAME

+
+

cdist-type__removeline - Remove a line (if existing)

+
+
+
+

DESCRIPTION

+
+

This type can be used to check a file for existence of a +specific line and removeing it, if it was found.

+
+
+
+

REQUIRED PARAMETERS

+
+
+
+line +
+
+

+ Specifies the content which shall be removed if existing. +

+
+
+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+file +
+
+

+ If supplied, use this as the destination file. + Otherwise the object_id is used. +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Daniel Roth. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist-type__user.html b/software/cdist/man/cdist-type__user.html new file mode 100644 index 00000000..4b4f20ca --- /dev/null +++ b/software/cdist/man/cdist-type__user.html @@ -0,0 +1,699 @@ + + + + + +cdist-type__user(7) + + + + + +
+
+

NAME

+
+

cdist-type__user - Manage users

+
+
+
+

DESCRIPTION

+
+

This cdist type allows you to create or modify users on the target.

+
+
+
+

REQUIRED PARAMETERS

+
+

None.

+
+
+
+

OPTIONAL PARAMETERS

+
+
+
+comment +
+
+

+ see usermod(8) +

+
+
+home +
+
+

+ see above +

+
+
+gid +
+
+

+ see above +

+
+
+groups +
+
+

+ see above +

+
+
+password +
+
+

+ see above +

+
+
+shell +
+
+

+ see above +

+
+
+uid +
+
+

+ see above +

+
+
+
+
+
+

EXAMPLES

+
+
+
+
# 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
+
+
+
+
+

SEE ALSO

+
+
    +
  • +

    +cdist-type(7) +

    +
  • +
+
+
+
+

COPYING

+
+

Copyright (C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + + diff --git a/software/cdist/man/cdist.html b/software/cdist/man/cdist.html new file mode 100644 index 00000000..60f34bd3 --- /dev/null +++ b/software/cdist/man/cdist.html @@ -0,0 +1,646 @@ + + + + + +cdist(7) + + + + + +
+
+

NAME

+
+

cdist - Configuration management system

+
+
+
+

DESCRIPTION

+
+

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. +Cdist ships with some types included. You can use or change them, create new +ones or even submit your types for inclusion into cdist.

+

The main command is cdist-deploy-to, which runs several stages to push +configurations to a host. If you want to deeply understand cdist, reading +the source of cdist-deploy-to is recommended. +Cdist currently uses the push approach (a server pushes out the +configuration to the clients), but future version will also support the +pull mechanism (client requests configuration).

+
+
+
+

SEE ALSO

+
+
+
+
+
+

COPYING

+
+

Copyright (C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3).

+
+
+
+

+ + +