This site uses cookies for analytics. By continuing to browse this site, you agree to use this.  Learn more

Basic cdist usage

Get in touch with the most simple and lightweight configuration ...

Posted on Sept. 2, 2015

Get cdist and installation

You can easily get the code for cdist from github:

git clone https://github.com/telmich/cdist.git
cd cdist
export PATH=$PATH:$(pwd -P)/bin

If you want the man pages run:

make

The man pages are now generated in the docs/ directory.

Or get the latest man pages here.

To run cdist on the source host (the one who configures the target host) the following software is required:

  • Python >= 3.2
  • SSH client
  • Asciidoc and xsltproc (for building the manpages)

On the target host only ssh is required
Also it is recommended to use ssh over ssh-key authentication.
Other hints you can find in the man7/cdist-best-practice

For shortly testing cdist, run:

cdist banner

And for seeing the usage, run:

cdist -h

 

 

Files and directories

Important directories are the installation directory and the $HOME/.cdist/ directory.

In the installation directory you can find the cdist binary, standard provided cdist types and other important files for cdist.

The $HOME/.cdist/ directory is for your locally needed configuration and has the following directory tree:

  • $HOME/.cdist/
    • manifest/
      • Your manifests (standard: init)
    • type/
      • Your own made types (always: __your_type)

 

Creating a sample manifest

Create a new manifest with the following command:

echo "__file /tmp/hello_world" > $HOME/.cdist/manifest/init

This manifest will use the _file for creating the file /tmp/hello_world.
For more information about the __file type see installation_dir/cdist/conf/type/_file/man.text

 

First run of cdist

For running your first own made cdist manifest on localhost use the following command:

cdist config -v localhost

 

More information

If you have trouble or want more information visit the github page or write us!

 

cdist.png