cdist/doc/man/cdist-language.text

73 lines
2 KiB
Text
Raw Normal View History

cdist-language(7)
=================
Nico Schottelius <nico-cdist--@--schottelius.org>
NAME
----
cdist-language - Cdist Configuration language
DESCRIPTION
-----------
A cdist configuration consists of the following parts:
- manifests (cdist-manifests(7))
- library (cdist-language-library(7))
- modules (cdist-language-modules(7))
In short the configuration is built as follows:
- conf/hosts/init is executed, the resulting output is used for module loading
- the appropriate modules are loaded and executed, which
- use library functions.
The three stages are used to seperate configurations:
- hosts contain mappings to created modules
- modules create (probably site specific) configurations using library collections
- the library is shipped with cdist, but can be extendet locally
- DSL: Shell!
- gives if, else and EVEN elsif for free!
- and case
- and and and
- and there's no os (solaris doesn't count) without a usable /bin/sh
- cdist defines what you can use
- you _can_ use os specific stuff
- but it's ugly and you shoot into your own foot
- "manifests" (use the same name here?) will be run/sourced
- inheritance possible via sourcing
- cdist-lib always preloaded
- document exported variables!
use __ prefix instead of __cdist (shorter writing, __ is defined as sytem anyway)
- library vs. modules?
Requirements:
It MUST be incredible easy/dumb to add new types.
=> growable default types
- how to write a module
- module function autoloading via *.sh
- module "manifest"?
- create functions in *.sh
- name functions "modulename_function"
module hellow
function kitty
=> hellow_kitty
- you are advised (not forced) to put files
to a subdirectory named "files"
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).