Initial commit

This commit is contained in:
Darko Poljak 2019-04-23 20:55:23 +02:00
commit cdcab934fc
19257 changed files with 4329793 additions and 0 deletions

.gitignore vendored Normal file
View File

@ -0,0 +1,19 @@
# -vim
# Swap
# Session
# Temporary
# Persistent undo
# sphinx build dirs, cache

Makefile Normal file
View File

@ -0,0 +1,74 @@
CDIST_CHANGELOG_VERSION=$(shell $(CDIST_HELPER) changelog-version)
CDIST_CLEAN_HTML=make -C "$(CDIST_DOCS_DIR)/src" clean
.PHONY: help
@echo "Please use \`make <target>' where <target> is one of"
@echo " website"
@echo " website-no-latest"
@echo " website-publish"
@echo " website-publish-no-latest"
@echo " website-publish-only"
@echo " clean"
# Website
# Make cdist html manual.
# Generate rst changelog.
# Create target version manual directory.
# Copy target version manual directory to website.
# Add latest manual page.
# Update latest manual link.
@awk '/^[0-9a-z.]+: [0-9-]+$$/ { print; for(i = 0; i < length; ++i) { printf "~"; }; printf "\n"; next; } { print; }' "$(CDIST_CHANGELOG_FILE)" > "$(WEBSITE_SRC_DIR)/cdist-changelog.rst"
website-prepare-latest: website-prepare
@grep '$(CDIST_CHANGELOG_VERSION)' "$(WEBSITE_MAN_PAGE)" || awk 'FNR == 11 { print "* `$(CDIST_CHANGELOG_VERSION) <manuals/$(CDIST_CHANGELOG_VERSION)>`_"; print; next; } /^\* `Latest manual/ { print "* `Latest manual <manuals/$(CDIST_CHANGELOG_VERSION)>`_"; next; } { print; }' "$(WEBSITE_MAN_PAGE)" > "$(WEBSITE_MAN_PAGE)-new" && mv "$(WEBSITE_MAN_PAGE)-new" "$(WEBSITE_MAN_PAGE)" || exit 0
# Build website.
website: website-prepare-latest
website-no-latest: website-prepare
&& tar -c -z -f "../$(WEBSITE_ARCHIVE)" . \
&& rm -f "../$(WEBSITE_ARCHIVE)"
# Publish static website
website-publish: website website-publish-only
website-publish-no-latest: website-no-latest website-publish-only

README Normal file
View File

@ -0,0 +1,4 @@
This is a cdist configuration management website.

src/Makefile Normal file
View File

@ -0,0 +1,237 @@
# Makefile for Sphinx documentation
# You can set these variables from the command line.
SPHINXBUILD = sphinx-build
BUILDDIR = ../dist
# for cache, etc.
_BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
# the i18n builder cannot share the environment and doctrees with the others
.PHONY: help
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " epub3 to make an epub3"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " dummy to check syntax errors of document sources"
.PHONY: clean
rm -rf $(BUILDDIR)/*
rm -rf $(_BUILDDIR)/*
.PHONY: html
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
@echo "Build finished; now you can process the pickle files."
.PHONY: json
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cdist-docs.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cdist-docs.qhc"
.PHONY: applehelp
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
.PHONY: devhelp
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/cdist-docs"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cdist-docs"
@echo "# devhelp"
.PHONY: epub
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: epub3
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
.PHONY: latex
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
mkdir -p $(BUILDDIR)/man/man1
mkdir -p $(BUILDDIR)/man/man7
mv -f $(BUILDDIR)/man/*.1 $(BUILDDIR)/man/man1/
mv -f $(BUILDDIR)/man/*.7 $(BUILDDIR)/man/man7/
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
.PHONY: dummy
@echo "Build finished. Dummy builder generates no files."

src/_static/cdist-logo.jpeg Normal file

Binary file not shown.


Width:  |  Height:  |  Size: 12 KiB

src/_static/cdist-logo.png Normal file

Binary file not shown.


Width:  |  Height:  |  Size: 1.5 KiB

src/_static/custom.css Normal file
View File

@ -0,0 +1,72 @@
@import url("alabaster.css");
body {
font-size: 16px;
div.body {
min-width: unset;
div.body h1 {
font-size: 175%;
div.body h2 {
font-size: 150%;
div.body h3 {
font-size: 125%;
div.body h4 {
font-size: 115%;
div.body h5 {
font-size: 110%;
div.body h6 {
font-size: 100%;
div.document {
margin-top: 30px;
div.sphinxsidebar {
margin-left: unset;
div.documentwrapper {
float: unset;
@media screen and (max-width: 870px) {
div.sphinxsidebar p.logo {
display: block;
div.documentwrapper {
margin-top: 50px;
div.sphinxsidebar {
margin-left: -25px;
margin-top: -40px;
background: #fff;
div.sphinxsidebar a {
color: #444;
div.footer {
display: block;
margin: unset;
text-align: left;
font-size: 12px;

View File

@ -0,0 +1,52 @@
Version: GnuPG v2

View File

@ -0,0 +1,24 @@
{%- extends "alabaster/layout.html" %}
{%- block content %}
<div class="document">
{%- block sidebar1 %}{{ sidebar() }}{% endblock %}
{%- block document %}
<div class="documentwrapper">
{%- if render_sidebar %}
<div class="bodywrapper">
{%- endif %}
<div class="body" role="main">
{% block body %} {% endblock %}
{%- if render_sidebar %}
{%- endif %}
{%- endblock %}
{%- block sidebar2 %}{% endblock %}
<div class="clearer"></div>
{%- endblock %}

View File

@ -0,0 +1,9 @@
{{ toctree(includehidden=theme_sidebar_includehidden) }}
{% if theme_extra_nav_links %}
<hr />
{% for text, uri in theme_extra_nav_links.items() %}
<li class="toctree-l1"><a href="{{ uri }}">{{ text }}</a></li>
{% endfor %}
{% endif %}

src/cdist-changelog.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
.. toctree::
:maxdepth: 1

src/cdist-features.rst Normal file
View File

@ -0,0 +1,48 @@
But cdist ticks differently, here is the feature set that makes it unique.
There is only one type to extend cdist called **type**
+ Type and core cleanly separated
+ Sticks completely to the KISS (keep it simple and stupid) paradigm
+ Meaningful error messages - do not lose time debugging error messages
+ Consistency in behaviour, naming and documentation
+ No surprise factor: Only do what is obviously clear, no magic
+ Define target state, do not focus on methods or scripts
+ Push architecture: Instantly apply your changes
**Small core**
cdist's core is very small - less code, less bugs
**Fast development**
Focus on straightforwardness of type creation is a main development objective
Batteries included: A lot of requirements can be solved using standard types
**Modern Programming Language**
cdist is written in Python
**Requirements, Scalability**
No central server needed, cdist operates in push mode and can be run from any computer
**Requirements, Scalability, Upgrade**
cdist only needs to be updated on the master, not on the target hosts
**Requirements, Security**
Uses well-know `SSH <>`_ as transport protocol
**Requirements, Simplicity**
Requires only shell and SSH server on the target
Reuse of existing tools like cat, find, mv, ...
**UNIX, familiar environment, documentation**
Is available as manpages and HTML
**UNIX, simplicity, familiar environment**
cdist is configured in POSIX shell

src/cdist-install.rst Normal file
View File

@ -0,0 +1,150 @@
How to install cdist
Source Host
This is the machine from which you will configure target hosts.
* /bin/sh: A posix like shell (for instance bash, dash, zsh)
* Python >= 3.2
* SSH client
* sphinx (for building html docs and/or the man pages)
Target Hosts
* /bin/sh: A posix like shell (for instance bash, dash, zsh)
* SSH server
Install cdist
You can install cdist either from git or as a python package.
From git
Cloning cdist from git gives you the advantage of having
a version control in place for development of your own stuff
To install cdist, execute the following commands:
.. code-block:: sh
git clone
cd cdist
export PATH=$PATH:$(pwd -P)/bin
From version 4.2.0 cdist tags and github releases are signed.
You can get GPG public key used for signing `here <_static/pgp-key-EFD2AE4EC36B6901.asc>`_.
To install cdist with distutils from cloned repository, first you have to
.. code-block:: sh
make version
Then, as usual, you execute the following command:
.. code-block:: sh
python install
Available versions in git
* The active development takes place in the **master** branch
* The released versions can be found in the tags
Other branches may be available for features or bugfixes, but they
may vanish at any point. To select a specific branch use
.. code-block:: sh
# Generic code
git checkout -b <localbranchname> origin/<branchname>
So for instance if you want to use and stay with version 4.1, you can use
.. code-block:: sh
git checkout -b 4.1 origin/4.1
Git mirrors
If the main site is down, you can acquire cdist from one of the following sites:
* git:// `github <>`_
* git:// `sourceforge <>`_
Building and using documentation (man and html)
If you want to build and use the documentation, run:
.. code-block:: sh
make docs
Documentation comes in two formats, man pages and full HTML
documentation. Documentation is built into distribution's
docs/dist directory. man pages are in docs/dist/man and
HTML documentation in docs/dist/html.
If you want to use man pages, run:
.. code-block:: sh
export MANPATH=$MANPATH:$(pwd -P)/docs/dist/man
Or you can move man pages from docs/dist/man directory to some
other directory and add it to MANPATH.
Full HTML documentation can be accessed at docs/dist/html/index.html.
You can also build only man pages or only html documentation, for
only man pages run:
.. code-block:: sh
make man
for only html documentation run:
.. code-block:: sh
make html
You can also build man pages for types in your ~/.cdist directory:
.. code-block:: sh
make dotman
Built man pages are now in docs/dist/man directory. If you have
some other custom .cdist directory, e.g. /opt/cdist then use:
.. code-block:: sh
make DOT_CDIST_PATH=/opt/cdist dotman
Note that `dotman`-target has to be built before a `make docs`-run, otherwise
the custom man-pages are not picked up.
Python package
Cdist is available as a python package at
`PyPi <>`_. You can install it using
.. code-block:: sh
pip install cdist

src/cdist-manual.rst Normal file
View File

@ -0,0 +1,110 @@
cdist manual
* `Latest manual <manuals/4.11.1>`_
* Checking out **beta** branch, i.e. cdist **trigger** and **preos** functionality?
Find the manual `here <manuals/beta>`_.
**All versions**
* `4.11.1 <manuals/4.11.1>`_
* `4.11.0 <manuals/4.11.0>`_
* `4.10.11 <manuals/4.10.11>`_
* `4.10.10 <manuals/4.10.10>`_
* `4.10.9 <manuals/4.10.9>`_
* `4.10.8 <manuals/4.10.8>`_
* `4.10.7 <manuals/4.10.7>`_
* `4.10.6 <manuals/4.10.6>`_
* `4.10.5 <manuals/4.10.5>`_
* `4.10.4 <manuals/4.10.4>`_
* `4.10.3 <manuals/4.10.3>`_
* `4.10.2 <manuals/4.10.2>`_
* `4.10.1 <manuals/4.10.1>`_
* `4.10.0 <manuals/4.10.0>`_
* `4.9.1 <manuals/4.9.1>`_
* `4.9.0 <manuals/4.9.0>`_
* `4.8.4 <manuals/4.8.4>`_
* `4.8.3 <manuals/4.8.3>`_
* `4.8.2 <manuals/4.8.2>`_
* `4.8.1 <manuals/4.8.1>`_
* `4.8.0 <manuals/4.8.0>`_
* `4.7.3 <manuals/4.7.3>`_
* `4.7.2 <manuals/4.7.2>`_
* `4.7.1 <manuals/4.7.1>`_
* `4.7.0 <manuals/4.7.0>`_
* `4.6.1 <manuals/4.6.1>`_
* `4.6.0 <manuals/4.6.0>`_
* `4.5.0 <manuals/4.5.0>`_
* `4.4.4 <manuals/4.4.4>`_
* `4.4.3 <manuals/4.4.3>`_
* `4.4.2 <manuals/4.4.2>`_
* `4.4.1 <manuals/4.4.1>`_
* `4.4.0 <manuals/4.4.0>`_
* `4.3.2 <manuals/4.3.2>`_
* `4.3.1 <manuals/4.3.1>`_
* `4.3.0 <manuals/4.3.0>`_
* `4.2.2 <manuals/4.2.2>`_
* `4.2.1 <manuals/4.2.1>`_
* `4.2.0 <manuals/4.2.0>`_
* `4.1.0 <manuals/4.1.0>`_
* `4.0.0 <manuals/4.0.0>`_
* `4.0.0pre3 <manuals/4.0.0pre3>`_
* `4.0.0pre2 <manuals/4.0.0pre2>`_
* `4.0.0pre1 <manuals/4.0.0pre1>`_
* `3.1.13 <manuals/3.1.13>`_
* `3.1.12 <manuals/3.1.12>`_
* `3.1.11 <manuals/3.1.11>`_
* `3.1.10 <manuals/3.1.10>`_
* `3.1.9 <manuals/3.1.9>`_
* `3.1.8 <manuals/3.1.8>`_
* `3.1.7 <manuals/3.1.7>`_
* `3.1.6 <manuals/3.1.6>`_
* `3.1.5 <manuals/3.1.5>`_
* `3.1.4 <manuals/3.1.4>`_
* `3.1.3 <manuals/3.1.3>`_
* `3.1.2 <manuals/3.1.2>`_
* `3.1.1 <manuals/3.1.1>`_
* `3.1.0 <manuals/3.1.0>`_
* `3.0.9 <manuals/3.0.9>`_
* `3.0.8 <manuals/3.0.8>`_
* `3.0.7 <manuals/3.0.7>`_
* `3.0.6 <manuals/3.0.6>`_
* `3.0.5 <manuals/3.0.5>`_
* `3.0.4 <manuals/3.0.4>`_
* `3.0.3 <manuals/3.0.3>`_
* `3.0.2 <manuals/3.0.2>`_
* `3.0.1 <manuals/3.0.1>`_
* `3.0.0 <manuals/3.0.0>`_
* `2.3.7 <manuals/2.3.7>`_
* `2.3.6 <manuals/2.3.6>`_
* `2.3.5 <manuals/2.3.5>`_
* `2.3.4 <manuals/2.3.4>`_
* `2.3.3 <manuals/2.3.3>`_
* `2.3.2 <manuals/2.3.2>`_
* `2.3.1 <manuals/2.3.1>`_
* `2.3.0 <manuals/2.3.0>`_
* `2.2.0 <manuals/2.2.0>`_
* `2.1.2 <manuals/2.1.2>`_
* `2.1.1 <manuals/2.1.1>`_
* `2.1.0 <manuals/2.1.0>`_
* `2.1.0pre8 <manuals/2.1.0pre8>`_
* `2.1.0pre7 <manuals/2.1.0pre7>`_
* `2.1.0pre6 <manuals/2.1.0pre6>`_
* `2.1.0pre5 <manuals/2.1.0pre5>`_
* `2.1.0pre4 <manuals/2.1.0pre4>`_
* `2.1.0pre3 <manuals/2.1.0pre3>`_
* `2.1.0pre2 <manuals/2.1.0pre2>`_
* `2.1.0pre1 <manuals/2.1.0pre1>`_
* `2.0.15 <manuals/2.0.15>`_
* `2.0.14 <manuals/2.0.14>`_
* `2.0.13 <manuals/2.0.13>`_
* `2.0.12 <manuals/2.0.12>`_
* `2.0.11 <manuals/2.0.11>`_
* `2.0.10 <manuals/2.0.10>`_
* `2.0.9 <manuals/2.0.9>`_
* `2.0.8 <manuals/2.0.8>`_
* `2.0.7 <manuals/2.0.7>`_
* `2.0.6 <manuals/2.0.6>`_
* `2.0.5 <manuals/2.0.5>`_
* `2.0.4 <manuals/2.0.4>`_

src/cdist-os.rst Normal file
View File

@ -0,0 +1,19 @@
Supported operating systems
cdist was tested or is know to run on at least
* `Alpine Linux <>`_
* `Archlinux <>`_
* `CentOS <>`_
* `Debian <>`_
* `Devuan <>`_
* `Fedora <>`_
* `FreeBSD <>`_
* `Gentoo <>`_
* `Mac OS X <>`_
* `NetBSD <>`_
* `OpenBSD <>`_
* `Redhat <>`_
* `Ubuntu <>`_
* `XenServer <>`_

src/cdist-speeches.rst Normal file
View File

@ -0,0 +1,9 @@
* `2013-11-22_eth_linux_erfa <speeches/2013-11-22_eth_linux_erfa.pdf>`_
* `2014-05-08_linuxtag_berlin <speeches/2014-05-08_linuxtag_berlin.pdf>`_
* ` <speeches/>`_
* `2014-06-10_openclouddays_teaser <speeches/2014-06-10_openclouddays_teaser.pdf>`_
* `2014-11-07_sfs_linux_erfa_cdist_web_prototype <speeches/2014-11-07_sfs_linux_erfa_cdist_web_prototype.pdf>`_
* `2014-11-07_sfs_linux_erfa_cdist4 <speeches/2014-11-07_sfs_linux_erfa_cdist4.pdf>`_

src/cdist-support.rst Normal file
View File

@ -0,0 +1,26 @@
Chat with us: `ungleich chat <>`_.
Mailing list
Bug reports, questions, patches, etc. should be send to the
`cdist mailing list <!forum/cdist-configuration-management>`_.
If you have an account
at `Linked in <>`_,
you can join the
`cdist group <>`_.
Commercial support
You can request commercial support for cdist from
`ungleich <>`_.

src/cdist-upgrade.rst Normal file
View File

@ -0,0 +1,188 @@
How to upgrade cdist
Update the git installation
To upgrade cdist in the current branch use
.. code-block:: sh
git pull
# Also update the manpages
./build man
export MANPATH=$MANPATH:$(pwd -P)/doc/man
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.
Safely upgrading to new versions
To upgrade to **any** further cdist version, you can take the
following procedure to do a safe upgrade:
.. code-block:: sh
# Create new branch to try out the update
git checkout -b upgrade_cdist
# Get latest cdist version in git database
git fetch -v
# see what will happen on merge - replace
# master with the branch you plan to merge
git diff upgrade_cdist..origin/master
# Merge the new version
git merge origin/master
Now you can ensure all custom types work with the new version.
Assume that you need to go back to an older version during
the migration/update, you can do so as follows:
.. code-block:: sh
# commit changes
git commit -m ...
# go back to original branch
git checkout master
After that, you can go back and continue the upgrade:
.. code-block:: sh
# git checkout upgrade_cdist
Update the python package
To upgrade to the lastet version do
.. code-block:: sh
pip install --upgrade cdist
General update instructions
Updating from 3.0 to 3.1
The type **\_\_ssh_authorized_keys** now also manages existing keys,
not only the ones added by cdist.
Updating from 2.3 to 3.0
The **changed** attribute of objects has been removed.
Use `messaging </software/cdist/man/3.0.0/man7/cdist-messaging.html>`_ instead.
Updating from 2.2 to 2.3
No incompatibilities.
Updating from 2.1 to 2.2
Starting with 2.2, the syntax for requiring a singleton type changed:
Old format:
.. code-block:: sh
require="__singleton_type/singleton" ...
New format:
.. code-block:: sh
require="__singleton_type" ...
Internally the "singleton" object id was dropped to make life more easy.
You can probably fix your configuration by running the following code
snippet (currently untested, please report back if it works for you):
.. code-block:: sh
find ~/.cdist/* -type f -exec sed -i 's,/singleton,,' {} \;
Updating from 2.0 to 2.1
Have a look at the update guide for [[2.0 to 2.1|2.0-to-2.1]].
* Type **\_\_package* and \_\_process** use --state **present** or **absent**.
The states **removed/installed** and **stopped/running** have been removed.
Support for the new states is already present in 2.0.
* Type **\_\_directory**: Parameter --parents and --recursive are now boolean
The old "yes/no" values need to be removed.
* Type **\_\_rvm_ruby**: Parameter --default is now boolean
The old "yes/no" values need to be removed.
* Type **\_\_rvm_gemset**: Parameter --default is now boolean
The old "yes/no" values need to be removed.
* Type **\_\_addifnosuchline** and **\_\_removeline** have been replaced by **\_\_line**
* The **conf** directory is now located at **cdist/conf**.
You need to migrate your types, explorers and manifests
manually to the new location.
* Replace the variable **\_\_self** by **\_\_object_name**
Support for the variable **\_\_object_name** is already present in 2.0.
* The types **\_\_autofs**, **\_\_autofs_map** and **\_\_autofs_reload** have been removed
(no maintainer, no users)
* Type **\_\_user**: Parameter --groups removed (use the new \_\_user_groups type)
* Type **\_\_ssh_authorized_key** has been replaced by more flexible type
Updating from 1.7 to 2.0
* Ensure python (>= 3.2) is installed on the source host
* Use "cdist config host" instead of "cdist-deploy-to host"
* Use "cdist config -p host1 host2" instead of "cdist-mass-deploy"
* Use "cdist banner" for fun
* Use **\_\_object_name** instead of **\_\_self** in manifests
Updating from 1.6 to 1.7
* If you used the global explorer **hardware_type**, you need to change
your code to use **machine** instead.
Updating from 1.5 to 1.6
* If you used **\_\_package_apt --preseed**, you need to use the new
type **\_\_debconf_set_selections** instead.
* The **\_\_package** types accepted either --state deinstalled or
--state uninstaaled. Starting with 1.6, it was made consistently
to --state removed.
Updating from 1.3 to 1.5
No incompatibilities.
Updating from 1.2 to 1.3
Rename **gencode** of every type to **gencode-remote**.
Updating from 1.1 to 1.2
No incompatibilities.
Updating from 1.0 to 1.1
In 1.1 the type **\_\_file** was split into **\_\_directory**, **\_\_file** and
**\_\_link**. The parameter **--type** was removed from **\_\_file**. Thus you
need to replace **\_\_file** calls in your manifests:
* Remove --type from all \_\_file calls
* If type was symlink, use \_\_link and --type symbolic
* If type was directory, use \_\_directory

src/cdist-why.rst Normal file
View File

@ -0,0 +1,72 @@
Why should I use cdist?
There are several motivations to use cdist, these
are probably the most popular ones.
Known language
Cdist is being configured in
`shell script <>`_.
Shell script is used by UNIX system engineers for decades.
So when cdist is introduced, your staff does not need to learn a new
`DSL <>`_
or programming language.
Powerful language
Not only is shell scripting widely known by system engineers,
but it is also a very powerful language. Here are some features
which make daily work easy:
* Configuration can react dynamicly on explored values
* High level string manipulation (using sed, awk, grep)
* Conditional support (**if, case**)
* Loop support (**for, while**)
* Support for dependencies between cdist types
More than shell scripting
If you compare regular shell scripting with cdist, there is one major
difference: When using cdist types,
the results are
`idempotent <>`_.
In practise that means it does not matter in which order you
call cdist types, the result is always the same.
Zero dependency configuration management
Cdist requires very little on a target system. Even better,
in almost all cases all dependencies are usually fulfilled.
Cdist does not require an agent or high level programming
languages on the target host: it will run on any host that
has a **ssh server running** and a posix compatible shell
(**/bin/sh**). Compared to other configuration management systems,
it does not require to open up an additional port.
Push based distribution
Cdist uses the push based model for configuration. In this
scenario, one (or more) computers connect to the target hosts
and apply the configuration. That way the source host has
very little requirements: Cdist can even run on a sysadmin
notebook that is loosely connected to the network and has
limited amount of resources.
Furthermore, from a security point of view, only one machine
needs access to the target hosts. No target hosts will ever
need to connect back to the source host, which contains the
full configuration.
Highly scalable
If at some point you manage more hosts than can be handled from
a single source host, you can simply add more resources: Either
add more cores to one host or add hosts.
Cdist will utilise the given resources in parallel.

src/ Normal file
View File

@ -0,0 +1,315 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# cdist-docs documentation build configuration file, created by
# sphinx-quickstart on Fri May 6 21:45:28 2016.
# This file is execfile()d with the current directory set to its
# containing dir.
# Note that not all possible configuration values are present in this
# autogenerated file.
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath(os.path.join(
# os.path.dirname(os.path.realpath(__file__)), "..", "..")))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = ['.rst']
# The encoding of source files.
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'cdist'
copyright = 'ungleich GmbH 2019'
# author = 'Darko Poljak'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
# The short X.Y version.
#version =
# The full version, including alpha/beta/rc tags.
#release =
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
html_theme_options = {
'logo': 'cdist-logo.jpeg',
'description': 'usable configuration management',
'github_button': False,
'extra_nav_links': {
'github repo': '',
'ungleich Home': '',
'show_powered_by': False,
'sidebar_width' : '300px',
'font_family': 'Raleway',
'head_font_family': 'Raleway',
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
# html_title = 'cdist-docs v0.0.1'
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico)
# being 16x16 or 32x32
# pixels large.
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
html_static_path = ['_static']
html_style = 'custom.css'
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
# html_extra_path = []
html_extra_path = ['extra', 'speeches', ]
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
# html_last_updated_fmt = None
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
# html_domain_indices = True
# If false, no index is generated.
# html_use_index = True
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# html_file_suffix = ""
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
# htmlhelp_basename =
# -- Options for LaTeX output ---------------------------------------------
# latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
# Latex figure (float) alignment
# 'figure_align': 'htbp',
# }
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
# latex_documents = []
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# If true, show page references after internal links.
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
# root_mandir = os.path.dirname(os.path.realpath(__file__))
# mandirs = []
# for mansubdir in ('man1', 'man7'):
# mandirs.append((os.path.join(root_mandir, mansubdir), mansubdir[-1]))
# man_pages = []
# for mandir, section in mandirs:
# for root, dirs, files in os.walk(mandir):
# for fname in files:
# froot, fext = os.path.splitext(fname)
# if fext == '.rst':
# man_page = (os.path.join('man' + str(section), froot),
# froot, '', [], section)
# man_pages.append(man_page)
# man_pages = [
# ('cdist-type', 'cdist-type', 'cdist-type documentation',
# [author], 1),
# ('man7/cdist-type__file', 'cdist-type__file',
# '', [], 1),
# ('cdist-type__directory', 'cdist-type__directory',
# 'cdist-type__directory documentation', [author], 1),
# ]
# If true, show URL addresses after external links.
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
# texinfo_documents = []
# Documents to append as an appendix to all manuals.
# texinfo_appendices = []
# If false, no module index is generated.
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False

src/docutils.conf Normal file
View File

@ -0,0 +1,2 @@
smart_quotes: false

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>cdist(1)</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /></head><body><div xml:lang="en" class="article" title="cdist(1)" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="idp25204032"></a>cdist(1)</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Nico</span> <span class="surname">Schottelius</span></h3><code class="email">&lt;<a class="email" href=""></a>&gt;</code></div></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="#_name">1. NAME</a></span></dt><dt><span class="section"><a href="#_synopsis">2. SYNOPSIS</a></span></dt><dt><span class="section"><a href="#_description">3. DESCRIPTION</a></span></dt><dt><span class="section"><a href="#_banner">4. BANNER</a></span></dt><dt><span class="section"><a href="#_config">5. CONFIG</a></span></dt><dt><span class="section"><a href="#_examples">6. EXAMPLES</a></span></dt><dt><span class="section"><a href="#_environment">7. ENVIRONMENT</a></span></dt><dt><span class="section"><a href="#_exit_status">8. EXIT STATUS</a></span></dt><dt><span class="section"><a href="#_see_also">9. SEE ALSO</a></span></dt><dt><span class="section"><a href="#_copying">10. COPYING</a></span></dt></dl></div><div class="section" title="1. NAME"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_name"></a>1. NAME</h2></div></div></div><p>cdist - Configuration management</p></div><div class="section" title="2. SYNOPSIS"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_synopsis"></a>2. SYNOPSIS</h2></div></div></div><p>cdist [-h] [-V]</p><p>cdist banner</p><p>cdist config [-h] [-d] [-V] [-c CDIST_HOME] [-i MANIFEST] [-p] [-s] host [host …]</p></div><div class="section" title="3. DESCRIPTION"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_description"></a>3. DESCRIPTION</h2></div></div></div><p>cdist is the frontend executable to the cdist configuration management.
cdist supports different as explained below. The options to the main
program are:</p><div class="variablelist"><dl><dt><span class="term">
-h, --help
Show the help screen
</dd><dt><span class="term">
-V, --version
Show version and exit
</dd></dl></div></div><div class="section" title="4. BANNER"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_banner"></a>4. BANNER</h2></div></div></div><p>Displays the cdist banner.</p></div><div class="section" title="5. CONFIG"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_config"></a>5. CONFIG</h2></div></div></div><p>Configure a system</p><div class="variablelist"><dl><dt><span class="term">
-h, --help
Show the help screen
</dd><dt><span class="term">
-c CDIST_HOME, --cdist-home CDIST_HOME
Instead of using the parent of the bin directory as cdist home,
use the specified directory
</dd><dt><span class="term">
-d, --debug
Enable debug output
</dd><dt><span class="term">
-i MANIFEST, --initial-manifest MANIFEST
Path to a cdist manifest or - to read from stdin
</dd><dt><span class="term">
-p, --parallel
Operate on multiple hosts in parallel
</dd><dt><span class="term">
-s, --sequential
Operate on multiple hosts sequentially
</dd></dl></div></div><div class="section" title="6. EXAMPLES"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_examples"></a>6. EXAMPLES</h2></div></div></div><pre class="screen"># Configure with debug enabled
cdist config -d
# Configure hosts in parallel and use a different home directory
cdist config -c ~/p/cdist-nutzung \
# Display banner
cdist banner
# Show help
cdist --help
# Show Version
cdist --version</pre></div><div class="section" title="7. ENVIRONMENT"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_environment"></a>7. ENVIRONMENT</h2></div></div></div><div class="variablelist"><dl><dt><span class="term">
Setup the base directory for the temporary directory.
See <a class="ulink" href="" target="_top"></a> for
more information. This is rather useful, if the standard
directory used does not allow executables.
</dd></dl></div></div><div class="section" title="8. EXIT STATUS"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_exit_status"></a>8. EXIT STATUS</h2></div></div></div><p>The following exit values shall be returned:</p><div class="variablelist"><dl><dt><span class="term">
Successful completion
</dd><dt><span class="term">
One or more host configuration failed.
</dd></dl></div></div><div class="section" title="9. SEE ALSO"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_see_also"></a>9. SEE ALSO</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
</li><li class="listitem">
</li></ul></div></div><div class="section" title="10. COPYING"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_copying"></a>10. COPYING</h2></div></div></div><p>Copyright (C) 2011-2012 Nico Schottelius. Free use of this software is
granted under the terms of the GNU General Public License version 3 (GPLv3).</p></div></div></body></html>

View File

@ -0,0 +1,314 @@
CSS stylesheet for XHTML produced by DocBook XSL stylesheets.
Tested with XSL stylesheets 1.61.2, 1.67.2
span.strong {
font-weight: bold;
body blockquote {
margin-top: .75em;