forked from ungleich-public/cdist
Merge branch 'master' into install_integration
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org> Conflicts: cdist/config.py cdist/emulator.py
This commit is contained in:
commit
79973d1582
66 changed files with 1086 additions and 87 deletions
|
|
@ -4,13 +4,36 @@ Changelog
|
|||
* Changes are always commented with their author in (braces)
|
||||
* Exception: No braces means author == Nico Schottelius
|
||||
|
||||
3.0.4:
|
||||
|
||||
3.0.7: 2014-02-08
|
||||
* Core: Allow dependencies to be created based execution order (Daniel Heule)
|
||||
* Core: Add tests for override (Daniel Heule)
|
||||
|
||||
3.0.6: 2014-02-06
|
||||
* New Type: __apt_key (Steven Armstrong)
|
||||
* New Type: __apt_key_uri (Steven Armstrong)
|
||||
* New Type: __apt_norecommends (Steven Armstrong)
|
||||
* New Type: __apt_source (Steven Armstrong)
|
||||
* New Type: __ccollect_source
|
||||
* Type __git: Use default parameters (Daniel Heule)
|
||||
* Type __jail: Use default parameters (Daniel Heule)
|
||||
* Type __package_yum: Use default parameters (Daniel Heule)
|
||||
* Type __package_zypper: Use default parameters (Daniel Heule)
|
||||
* Type __user_groups: Use default parameters (Daniel Heule)
|
||||
|
||||
3.0.5: 2014-02-05
|
||||
* Core: Introduce override concept (Daniel Heule)
|
||||
* Type __process: Make --state absent work (Steven Armstrong)
|
||||
* Documentation: Update documentation for environment variables
|
||||
|
||||
3.0.4: 2014-01-29
|
||||
* Core: Ignore install types in config mode
|
||||
* Documentation: Update reference (files path in object space)
|
||||
* Documentation: Update best practise: Replaces templates/ with files/
|
||||
* Type __apt_ppa: Install required software (Steven Armstrong)
|
||||
* Type __debconf_set_selections: Support --file - to read from stdin
|
||||
* Type __jail: Fix jaildir parameter handling (Jake Guffey)
|
||||
|
||||
|
||||
3.0.3: 2014-01-22
|
||||
* Core: Enhance error message when requirement is missing object id
|
||||
* Core: Add environment variable to select shell for executing scripts (Daniel Heule)
|
||||
|
|
@ -23,7 +46,6 @@ Changelog
|
|||
* Type __zypper_repo: Use default paremeters (Daniel Heule)
|
||||
* Type __zypper_service: Use default paremeters (Daniel Heule)
|
||||
|
||||
|
||||
3.0.2: 2014-01-19
|
||||
* Documentation: Document all messages sent by types (Daniel Heule)
|
||||
* New Type: __block (Steven Armstrong)
|
||||
|
|
@ -31,7 +53,6 @@ Changelog
|
|||
* Type __cron: Replace existing entry when changing it (Daniel Heule)
|
||||
* Type __ssh_authorized_keys: Use new type __block (Steven Armstrong)
|
||||
|
||||
|
||||
3.0.1: 2014-01-14
|
||||
* Core: Copy only files, not directories (Steven Armstrong)
|
||||
* Core: Allow hostnames to start with /
|
||||
|
|
|
|||
|
|
@ -188,8 +188,10 @@ stdin::
|
|||
when the type was called.
|
||||
|
||||
|
||||
ENVIRONMENT VARIABLES
|
||||
---------------------
|
||||
ENVIRONMENT VARIABLES (FOR READING)
|
||||
-----------------------------------
|
||||
The following environment variables are exported by cdist:
|
||||
|
||||
__explorer::
|
||||
Directory that contains all global explorers.
|
||||
Available for: initial manifest, explorer, type explorer, shell
|
||||
|
|
@ -227,6 +229,18 @@ __type_explorer::
|
|||
Directory that contains the type explorers.
|
||||
Available for: type explorer
|
||||
|
||||
ENVIRONMENT VARIABLES (FOR WRITING)
|
||||
-----------------------------------
|
||||
The following environment variables influence the behaviour of cdist:
|
||||
|
||||
require::
|
||||
Setup dependencies between objects (see cdist-manifest(7))
|
||||
|
||||
CDIST_ALLOW_OVERRIDE::
|
||||
Allow overwriting type parameters (see cdist-manifest(7))
|
||||
|
||||
CDIST_ORDER_DEPENDENCY::
|
||||
Create dependencies based on the execution order (see cdist-manifest(7))
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
|
|
@ -235,6 +249,6 @@ SEE ALSO
|
|||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is
|
||||
Copyright \(C) 2011-2014 Nico Schottelius. Free use of this software is
|
||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
||||
eof
|
||||
|
|
|
|||
|
|
@ -128,6 +128,34 @@ All objects that are created in a type manifest are automatically required
|
|||
from the type that is calling them. This is called "autorequirement" in
|
||||
cdist jargon.
|
||||
|
||||
CREATE DEPENDENCIES FROM EXECUTION ORDER
|
||||
-----------------------------------------
|
||||
You can tell cdist to execute all types in the order in which they are created
|
||||
in the manifest by setting up the variable CDIST_ORDER_DEPENDENCY.
|
||||
When cdist sees that this variable is setup, the current created object
|
||||
automatically depends on the previously created object.
|
||||
|
||||
It essentially helps you to build up blocks of code that build upon each other
|
||||
(like first creating the directory xyz than the file below the directory).
|
||||
|
||||
THIS IS A BETA FEATURE AND MAY BE REMOVED OR CHANGED AT ANY TIME.
|
||||
|
||||
|
||||
OVERRIDES
|
||||
---------
|
||||
In some special cases, you would like to create an already defined object
|
||||
with different parameters. In normal situations this leads to an error in cdist.
|
||||
If you whish, you can setup the environment variable CDIST_OVERRIDE
|
||||
(any value or even empty is ok) to tell cdist, that this object override is
|
||||
wanted and should be accepted.
|
||||
ATTENTION: Only use this feature if you are 100% sure in which order
|
||||
cdist encounter the affected objects, otherwhise this results
|
||||
into an undefined situation.
|
||||
|
||||
THIS IS A BETA FEATURE AND MAY BE REMOVED OR CHANGED AT ANY TIME.
|
||||
|
||||
|
||||
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
|
@ -161,6 +189,50 @@ __package lighttpd --state present
|
|||
require="__package/lighttpd" __package munin --state present
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
How to override objects:
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
# for example in the inital manifest
|
||||
|
||||
# reate user account foobar with some hash for password
|
||||
__user foobar --password 'some_fancy_hash' --home /home/foobarexample
|
||||
|
||||
# ... many statements and includes in the manifest later ...
|
||||
# somewhere in a conditionaly sourced manifest
|
||||
# (e.g. for example only sourced if a special application is on the target host)
|
||||
|
||||
# this leads to an error ...
|
||||
__user foobar --password 'some_other_hash'
|
||||
|
||||
# this tells cdist, that you know that this is an override and should be accepted
|
||||
CDIST_OVERRIDE=yes __user foobar --password 'some_other_hash'
|
||||
# its only an override, means the parameter --home is not touched
|
||||
# and stay at the original value of /home/foobarexample
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Dependencies defined by execution order work as following:
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# Tells cdist to execute all types in the order in which they are created ...
|
||||
export CDIST_ORDER_DEPENDENCY=on
|
||||
__sample_type 1
|
||||
require="__some_type_somewhere/id" __sample_type 2
|
||||
__example_type 23
|
||||
# Now this types are executed in the creation order until the variable is unset
|
||||
unset CDIST_ORDER_DEPENDENCY
|
||||
# all now following types cdist makes the order ..
|
||||
__not_in_order_type 42
|
||||
|
||||
# how it works :
|
||||
# this lines above are translated to:
|
||||
__sample_type 1
|
||||
require="__some_type_somewhere/id __sample_type/1" __sample_type 2
|
||||
require="__sample_type/2" __example_type 23
|
||||
__not_in_order_type 42
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
SEE ALSO
|
||||
|
|
@ -171,5 +243,5 @@ SEE ALSO
|
|||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2010-2012 Nico Schottelius. Free use of this software is
|
||||
Copyright \(C) 2010-2014 Nico Schottelius. Free use of this software is
|
||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
||||
|
|
|
|||
|
|
@ -20,6 +20,6 @@ you can join the
|
|||
### Commercial support
|
||||
|
||||
You can request commercial support for cdist from
|
||||
[my company](http://firma.schottelius.org/english/).
|
||||
[my company](http://www.ungleich.ch/english/).
|
||||
|
||||
[[!tag cdist unix]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue