only run type manifest if it exists
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
74300ab38e
commit
6dada17509
1 changed files with 11 additions and 10 deletions
|
@ -84,13 +84,14 @@ class Manifest(object):
|
||||||
|
|
||||||
def run_type_manifest(self, cdist_object):
|
def run_type_manifest(self, cdist_object):
|
||||||
script = os.path.join(self.local.type_path, cdist_object.type.manifest_path)
|
script = os.path.join(self.local.type_path, cdist_object.type.manifest_path)
|
||||||
env = os.environ.copy()
|
if os.path.isfile(script):
|
||||||
env.update(self.env)
|
env = os.environ.copy()
|
||||||
env.update({
|
env.update(self.env)
|
||||||
'__object': cdist_object.absolute_path,
|
env.update({
|
||||||
'__object_id': cdist_object.object_id,
|
'__object': cdist_object.absolute_path,
|
||||||
'__object_fq': cdist_object.path,
|
'__object_id': cdist_object.object_id,
|
||||||
'__type': cdist_object.type.absolute_path,
|
'__object_fq': cdist_object.path,
|
||||||
'__cdist_manifest': script,
|
'__type': cdist_object.type.absolute_path,
|
||||||
})
|
'__cdist_manifest': script,
|
||||||
return self.local.run_script(script, env=env)
|
})
|
||||||
|
return self.local.run_script(script, env=env)
|
||||||
|
|
Loading…
Reference in a new issue