forked from ungleich-public/cdist
documentation to __object in execution run
This commit is contained in:
parent
5ef27191fc
commit
b87b5eab31
2 changed files with 29 additions and 6 deletions
|
|
@ -252,6 +252,27 @@ echo "touch /etc/cdist-configured"
|
|||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
VARIABLE ACCESS FROM THE GENERATED SCRIPTS
|
||||
------------------------------------------
|
||||
In the generated scripts, you have access to the following cdist variables
|
||||
|
||||
- __object
|
||||
- __object_id
|
||||
|
||||
but only for read operations, means there is no back copy of this
|
||||
files after the script execution.
|
||||
|
||||
So when you generate a script with the following content, it will work:
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
if [ -f "$__object/parameter/name" ]; then
|
||||
name="$(cat "$__object/parameter/name")"
|
||||
else
|
||||
name="$__object_id"
|
||||
fi
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
HINTS FOR TYPEWRITERS
|
||||
----------------------
|
||||
It must be assumed that the target is pretty dumb and thus does not have high
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue