From 7d2799d958ce90769f19d54f74359f4b4db7fba6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 4 Apr 2012 17:21:54 +0200 Subject: [PATCH] Make __manifest usable in type manifests Signed-off-by: Nico Schottelius --- doc/changelog | 1 + doc/man/cdist-reference.text.sh | 2 +- lib/cdist/core/manifest.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index 0bd00135..e3f7d1a5 100644 --- a/doc/changelog +++ b/doc/changelog @@ -10,6 +10,7 @@ Changelog * Bugfix __package_yum: Missing cat * Bugfix __start_on_boot: Correctly use sed and quotes (Steven Armstrong) * Feature __file: Support for --state exists (Steven Armstrong) + * Feature core: Make variable __manifest available to type manifests 2.0.9: 2012-03-12 * Cleanup documentation: Fix environment variable list to be properly diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 6bd5f1b8..2aa87aa1 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -173,7 +173,7 @@ __explorer:: Available for: explorer, type explorer __manifest:: Directory that contains the initial manifest. - Available for: initial manifest + Available for: initial manifest, type manifest __global:: Directory that contains generic output like explorer. Available for: initial manifest, type manifest, type gencode diff --git a/lib/cdist/core/manifest.py b/lib/cdist/core/manifest.py index 8b784229..4b798883 100644 --- a/lib/cdist/core/manifest.py +++ b/lib/cdist/core/manifest.py @@ -92,6 +92,7 @@ class Manifest(object): env = os.environ.copy() env.update(self.env) env.update({ + '__manifest': self.local.manifest_path, '__object': cdist_object.absolute_path, '__object_id': cdist_object.object_id, '__object_name': cdist_object.name,