2011-09-12 08:58:10 +00:00
|
|
|
cdist(1)
|
|
|
|
========
|
2016-06-23 14:08:59 +00:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
cdist - Usable Configuration Management
|
2011-09-12 08:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2011-09-13 20:48:14 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
::
|
|
|
|
|
|
|
|
cdist [-h] [-d] [-v] [-V] {banner,config,shell} ...
|
|
|
|
|
|
|
|
cdist banner [-h] [-d] [-v]
|
2011-09-13 20:48:14 +00:00
|
|
|
|
2016-08-14 18:11:45 +00:00
|
|
|
cdist config [-h] [-d] [-v] [-c CONF_DIR] [-f HOSTFILE] [-i MANIFEST]
|
|
|
|
[-n] [-o OUT_PATH] [-p] [-s] [--remote-copy REMOTE_COPY]
|
|
|
|
[--remote-exec REMOTE_EXEC]
|
|
|
|
[host [host ...]]
|
2011-09-13 19:35:57 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
cdist shell [-h] [-d] [-v] [-s SHELL]
|
2011-09-12 08:58:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
cdist is the frontend executable to the cdist configuration management.
|
2016-07-20 06:16:58 +00:00
|
|
|
It supports different subcommands as explained below.
|
|
|
|
|
|
|
|
It is written in Python so it requires :strong:`python`\ (1) to be installed.
|
|
|
|
It requires a minimal Python version 3.2.
|
2013-08-12 09:42:00 +00:00
|
|
|
|
|
|
|
GENERAL
|
|
|
|
-------
|
2014-04-29 19:33:18 +00:00
|
|
|
All commands accept the following options:
|
2013-08-12 09:42:00 +00:00
|
|
|
|
2016-08-14 18:11:45 +00:00
|
|
|
.. option:: -h, --help
|
2016-05-20 06:50:56 +00:00
|
|
|
|
2016-08-14 18:11:45 +00:00
|
|
|
Show the help screen
|
2011-09-13 19:35:57 +00:00
|
|
|
|
2016-08-14 18:11:45 +00:00
|
|
|
.. option:: -d, --debug
|
2016-05-20 06:50:56 +00:00
|
|
|
|
2016-08-14 18:11:45 +00:00
|
|
|
Set log level to debug
|
2011-09-13 20:48:14 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. option:: -v, --verbose
|
|
|
|
|
2013-08-12 09:42:00 +00:00
|
|
|
Set log level to info, be more verbose
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. option:: -V, --version
|
|
|
|
|
2011-09-13 19:35:57 +00:00
|
|
|
Show version and exit
|
2011-09-12 08:58:10 +00:00
|
|
|
|
|
|
|
|
2011-09-13 19:35:57 +00:00
|
|
|
BANNER
|
2013-08-12 09:42:00 +00:00
|
|
|
------
|
|
|
|
Displays the cdist banner. Useful for printing
|
|
|
|
cdist posters - a must have for every office.
|
2011-09-13 19:35:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
CONFIG
|
|
|
|
------
|
2016-07-20 06:16:58 +00:00
|
|
|
Configure one or more hosts.
|
2011-09-13 19:35:57 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. option:: -c CONF_DIR, --conf-dir CONF_DIR
|
|
|
|
|
2012-11-30 12:48:34 +00:00
|
|
|
Add a configuration directory. Can be specified multiple times.
|
|
|
|
If configuration directories contain conflicting types, explorers or
|
|
|
|
manifests, then the last one found is used. Additionally this can also
|
|
|
|
be configured by setting the CDIST_PATH environment variable to a colon
|
|
|
|
delimited list of config directories. Directories given with the
|
|
|
|
--conf-dir argument have higher precedence over those set through the
|
|
|
|
environment variable.
|
2011-09-12 09:18:18 +00:00
|
|
|
|
2016-05-25 05:39:53 +00:00
|
|
|
.. option:: -f HOSTFILE, --file HOSTFILE
|
|
|
|
|
2016-05-22 07:45:08 +00:00
|
|
|
Read additional hosts to operate on from specified file
|
|
|
|
or from stdin if '-' (each host on separate line).
|
|
|
|
If no host or host file is specified then, by default,
|
|
|
|
read hosts from stdin.
|
2016-05-22 07:22:39 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. option:: -i MANIFEST, --initial-manifest MANIFEST
|
|
|
|
|
2012-05-22 13:06:04 +00:00
|
|
|
Path to a cdist manifest or - to read from stdin
|
2011-09-12 09:18:18 +00:00
|
|
|
|
2016-08-14 18:11:45 +00:00
|
|
|
.. option:: -n, --dry-run
|
|
|
|
|
|
|
|
Do not execute code
|
|
|
|
|
|
|
|
.. option:: -o OUT_PATH, --out-dir OUT_PATH
|
|
|
|
|
|
|
|
Directory to save cdist output in
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. option:: -p, --parallel
|
|
|
|
|
2012-05-22 13:06:04 +00:00
|
|
|
Operate on multiple hosts in parallel
|
2011-09-12 09:18:18 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. option:: -s, --sequential
|
|
|
|
|
2016-08-14 18:11:45 +00:00
|
|
|
Operate on multiple hosts sequentially (default)
|
2012-05-22 13:06:04 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. option:: --remote-copy REMOTE_COPY
|
|
|
|
|
2012-05-22 13:06:04 +00:00
|
|
|
Command to use for remote copy (should behave like scp)
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. option:: --remote-exec REMOTE_EXEC
|
|
|
|
|
2012-05-22 13:06:04 +00:00
|
|
|
Command to use for remote execution (should behave like ssh)
|
2011-09-12 08:58:10 +00:00
|
|
|
|
2013-08-12 09:42:00 +00:00
|
|
|
SHELL
|
|
|
|
-----
|
2013-08-12 10:32:58 +00:00
|
|
|
This command allows you to spawn a shell that enables access
|
|
|
|
to the types as commands. It can be thought as an
|
|
|
|
"interactive manifest" environment. See below for example
|
|
|
|
usage. Its primary use is for debugging type parameters.
|
2013-08-12 09:42:00 +00:00
|
|
|
|
2016-08-14 18:11:45 +00:00
|
|
|
.. option:: -s SHELL, --shell SHELL
|
2016-05-20 06:50:56 +00:00
|
|
|
|
2016-07-19 11:00:14 +00:00
|
|
|
Select shell to use, defaults to current shell. Used shell should
|
|
|
|
be POSIX compatible shell.
|
2013-08-12 09:42:00 +00:00
|
|
|
|
2016-07-19 11:00:14 +00:00
|
|
|
FILES
|
|
|
|
-----
|
|
|
|
~/.cdist
|
|
|
|
Your personal cdist config directory. If exists it will be
|
|
|
|
automatically used.
|
2016-07-20 06:16:58 +00:00
|
|
|
cdist/conf
|
|
|
|
The distribution configuration directory. It contains official types and
|
|
|
|
explorers. This path is relative to cdist installation directory.
|
2011-09-12 08:58:10 +00:00
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
--------
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. code-block:: sh
|
2012-05-22 13:06:04 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# Configure ikq05.ethz.ch with debug enabled
|
|
|
|
% cdist config -d ikq05.ethz.ch
|
2011-09-13 19:35:57 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# Configure hosts in parallel and use a different configuration directory
|
|
|
|
% cdist config -c ~/p/cdist-nutzung \
|
|
|
|
-p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
|
2011-09-12 08:58:10 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# Use custom remote exec / copy commands
|
|
|
|
% cdist config --remote-exec /path/to/my/remote/exec \
|
|
|
|
--remote-copy /path/to/my/remote/copy \
|
|
|
|
-p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
|
2011-09-13 19:35:57 +00:00
|
|
|
|
2016-05-25 05:39:53 +00:00
|
|
|
# Configure hosts read from file loadbalancers
|
|
|
|
% cdist config -f loadbalancers
|
2011-09-13 19:35:57 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# Display banner
|
|
|
|
cdist banner
|
2013-08-12 09:42:00 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# Show help
|
|
|
|
% cdist --help
|
2013-08-12 09:42:00 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# Show Version
|
|
|
|
% cdist --version
|
2013-08-12 09:42:00 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# Enter a shell that has access to emulated types
|
|
|
|
% cdist shell
|
|
|
|
% __git
|
|
|
|
usage: __git --source SOURCE [--state STATE] [--branch BRANCH]
|
|
|
|
[--group GROUP] [--owner OWNER] [--mode MODE] object_id
|
2011-09-12 08:58:10 +00:00
|
|
|
|
|
|
|
|
2011-09-18 19:04:23 +00:00
|
|
|
ENVIRONMENT
|
|
|
|
-----------
|
2016-05-20 06:50:56 +00:00
|
|
|
TMPDIR, TEMP, TMP
|
2014-01-20 19:30:37 +00:00
|
|
|
Setup the base directory for the temporary directory.
|
|
|
|
See http://docs.python.org/py3k/library/tempfile.html for
|
|
|
|
more information. This is rather useful, if the standard
|
|
|
|
directory used does not allow executables.
|
|
|
|
|
2016-07-20 06:16:58 +00:00
|
|
|
CDIST_PATH
|
|
|
|
Colon delimited list of config directories.
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
CDIST_LOCAL_SHELL
|
2016-07-20 06:16:58 +00:00
|
|
|
Selects shell for local script execution, defaults to /bin/sh.
|
2014-01-20 19:30:37 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
CDIST_REMOTE_SHELL
|
2016-07-20 06:16:58 +00:00
|
|
|
Selects shell for remote scirpt execution, defaults to /bin/sh.
|
|
|
|
|
|
|
|
CDIST_OVERRIDE
|
|
|
|
Allow overwriting type parameters.
|
|
|
|
|
|
|
|
CDIST_ORDER_DEPENDENCY
|
|
|
|
Create dependencies based on the execution order.
|
2011-09-18 19:04:23 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
CDIST_REMOTE_EXEC
|
2016-07-20 06:16:58 +00:00
|
|
|
Use this command for remote execution (should behave like ssh).
|
2016-03-18 22:34:02 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
CDIST_REMOTE_COPY
|
2016-07-20 06:16:58 +00:00
|
|
|
Use this command for remote copy (should behave like scp).
|
2012-03-12 19:20:18 +00:00
|
|
|
|
|
|
|
EXIT STATUS
|
|
|
|
-----------
|
|
|
|
The following exit values shall be returned:
|
|
|
|
|
2016-07-20 06:16:58 +00:00
|
|
|
0 Successful completion.
|
|
|
|
|
|
|
|
1 One or more host configurations failed.
|
2012-03-12 19:20:18 +00:00
|
|
|
|
|
|
|
|
2016-06-17 19:28:16 +00:00
|
|
|
AUTHORS
|
|
|
|
-------
|
|
|
|
Nico Schottelius <nico-cdist--@--schottelius.org>
|
2011-09-12 08:58:10 +00:00
|
|
|
|
|
|
|
COPYING
|
|
|
|
-------
|
2013-08-12 09:42:00 +00:00
|
|
|
Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is
|
2016-07-20 05:55:48 +00:00
|
|
|
granted under the terms of the GNU General Public License v3 or later (GPLv3+).
|