|
|
@ -2,6 +2,7 @@ |
|
|
|
# |
|
|
|
# |
|
|
|
# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) |
|
|
|
# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) |
|
|
|
# 2012 Steven Armstrong (steven-cdist at armstrong.cc) |
|
|
|
# 2012 Steven Armstrong (steven-cdist at armstrong.cc) |
|
|
|
|
|
|
|
# 2014 Daniel Heule (hda at sfs.biz) |
|
|
|
# |
|
|
|
# |
|
|
|
# This file is part of cdist. |
|
|
|
# This file is part of cdist. |
|
|
|
# |
|
|
|
# |
|
|
@ -144,12 +145,14 @@ class Emulator(object): |
|
|
|
if value is not None: |
|
|
|
if value is not None: |
|
|
|
self.parameters[key] = value |
|
|
|
self.parameters[key] = value |
|
|
|
|
|
|
|
|
|
|
|
if self.cdist_object.exists: |
|
|
|
if self.cdist_object.exists and os.environ.get('CDIST_ALLOW_OVERRIDE',"false") != 'true': |
|
|
|
if self.cdist_object.parameters != self.parameters: |
|
|
|
if self.cdist_object.parameters != self.parameters: |
|
|
|
raise cdist.Error("Object %s already exists with conflicting parameters:\n%s: %s\n%s: %s" |
|
|
|
raise cdist.Error("Object %s already exists with conflicting parameters:\n%s: %s\n%s: %s" |
|
|
|
% (self.cdist_object.name, " ".join(self.cdist_object.source), self.cdist_object.parameters, self.object_source, self.parameters) |
|
|
|
% (self.cdist_object.name, " ".join(self.cdist_object.source), self.cdist_object.parameters, self.object_source, self.parameters) |
|
|
|
) |
|
|
|
) |
|
|
|
else: |
|
|
|
else: |
|
|
|
|
|
|
|
if self.cdist_object.exists: |
|
|
|
|
|
|
|
self.log.debug('Object %s override forced with CDIST_ALLOW_OVERRIDE=true',self.cdist_object.name) |
|
|
|
self.cdist_object.create() |
|
|
|
self.cdist_object.create() |
|
|
|
self.cdist_object.parameters = self.parameters |
|
|
|
self.cdist_object.parameters = self.parameters |
|
|
|
|
|
|
|
|
|
|
|