forked from ungleich-public/cdist
examples are always the last section
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
a9dd040164
commit
99dedc4933
1 changed files with 29 additions and 29 deletions
|
@ -129,6 +129,35 @@ from the type that is calling them. This is called "autorequirement" in
|
|||
cdist jargon.
|
||||
|
||||
|
||||
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 mark this second definition of an object with
|
||||
CDIST_ALLOW_OVERRIDE=true 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
# for example in the inial manifest
|
||||
|
||||
# reate user account foobar with some hash for password
|
||||
__user foobar --password 'some_fancy_hash'
|
||||
|
||||
# ... 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_ALLOW_OVERRIDE=true __user foobar --password 'some_other_hash'
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
The initial manifest may for instance contain the following code:
|
||||
|
@ -161,35 +190,6 @@ __package lighttpd --state present
|
|||
require="__package/lighttpd" __package munin --state present
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
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 mark this second definition of an object with
|
||||
CDIST_ALLOW_OVERRIDE=true 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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
# for example in the inial manifest
|
||||
|
||||
# reate user account foobar with some hash for password
|
||||
__user foobar --password 'some_fancy_hash'
|
||||
|
||||
# ... 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_ALLOW_OVERRIDE=true __user foobar --password 'some_other_hash'
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- cdist-tutorial(7)
|
||||
|
|
Loading…
Reference in a new issue