Merge branch 'origin/feature_object_override' of git://github.com/dheule/cdist
This commit is contained in:
commit
1be3ea4362
2 changed files with 4 additions and 4 deletions
|
|
@ -146,14 +146,14 @@ class Emulator(object):
|
|||
if value is not None:
|
||||
self.parameters[key] = value
|
||||
|
||||
if self.cdist_object.exists and not 'CDIST_ALLOW_OVERRIDE' in os.environ:
|
||||
if self.cdist_object.exists and not 'CDIST_OVERRIDE' in os.environ:
|
||||
if self.cdist_object.parameters != self.parameters:
|
||||
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)
|
||||
)
|
||||
else:
|
||||
if self.cdist_object.exists:
|
||||
self.log.debug('Object %s override forced with CDIST_ALLOW_OVERRIDE',self.cdist_object.name)
|
||||
self.log.debug('Object %s override forced with CDIST_OVERRIDE',self.cdist_object.name)
|
||||
self.cdist_object.create(True)
|
||||
else:
|
||||
self.cdist_object.create()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue