diff --git a/cdist/core/code.py b/cdist/core/code.py index 05280aa5..0971072b 100644 --- a/cdist/core/code.py +++ b/cdist/core/code.py @@ -196,6 +196,7 @@ class Code: env = os.environ.copy() env.update(self.env) env.update({ + '__type': cdist_object.cdist_type.absolute_path, '__object': cdist_object.absolute_path, '__object_id': cdist_object.object_id, }) diff --git a/docs/src/cdist-reference.rst.sh b/docs/src/cdist-reference.rst.sh index c0ac2c3e..1c001893 100755 --- a/docs/src/cdist-reference.rst.sh +++ b/docs/src/cdist-reference.rst.sh @@ -253,6 +253,11 @@ __global Directory that contains generic output like explorer. Available for: initial manifest, type manifest, type gencode, shell. +__library + Directory that contains common code. + + Available for: initial manifest, type manifest, type gencode, code scripts, + global explorer, type explorer. __messages_in File to read messages from. @@ -301,11 +306,15 @@ __target_host_tags __type Path to the current type. - Available for: type manifest, type gencode. + Available for: type manifest, type gencode, local code. __type_explorer Directory that contains the type explorers. Available for: type explorer. +__type_library + Directory that contains type-specific common code. + + Available for: type explorer, code-remote. Environment variables (for writing) -----------------------------------