support dry_run in stage_run_iterate as well

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-12-19 19:37:43 +01:00
parent c270538072
commit 4fd27e76a7
1 changed files with 4 additions and 1 deletions

View File

@ -56,6 +56,9 @@ class ConfigInstall(object):
self.manifest = core.Manifest(self.context.target_host, self.local)
self.code = core.Code(self.context.target_host, self.local, self.remote)
# Add switch to disable code execution
self.dry_run = False
def cleanup(self):
# FIXME: move to local?
destination = os.path.join(self.local.cache_path, self.context.target_host)
@ -171,7 +174,7 @@ class ConfigInstall(object):
if not cdist_object.state == cdist_object.STATE_DONE:
self.all_resolved = False
if cdist_object.satisfied_requirements:
self.object_run(cdist_object)
self.object_run(cdist_object, self.dry_run)
self.objects_changed = True
# Not all are resolved, but nothing has been changed => bad dependencies!