CDIST_ALLOW_OVERRIDE -> CDIST_OVERRIDE as requested by nico
This commit is contained in:
parent
98e7b7644c
commit
52e2017d8f
2 changed files with 4 additions and 4 deletions
|
@ -145,14 +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 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:
|
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:
|
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)
|
self.cdist_object.create(True)
|
||||||
else:
|
else:
|
||||||
self.cdist_object.create()
|
self.cdist_object.create()
|
||||||
|
|
|
@ -133,7 +133,7 @@ OVERRIDES
|
||||||
---------
|
---------
|
||||||
In some special cases, you would like to create an already defined object
|
In some special cases, you would like to create an already defined object
|
||||||
with different parameters. In normal situations this leads to an error in cdist.
|
with different parameters. In normal situations this leads to an error in cdist.
|
||||||
If you whish, you can setup the environment variable CDIST_ALLOW_OVERRIDE
|
If you whish, you can setup the environment variable CDIST_OVERRIDE
|
||||||
(any value or even empty is ok) to tell cdist, that this object override is
|
(any value or even empty is ok) to tell cdist, that this object override is
|
||||||
wanted and should be accepted.
|
wanted and should be accepted.
|
||||||
ATTENTION: Only use this feature if you are 100% sure in which order
|
ATTENTION: Only use this feature if you are 100% sure in which order
|
||||||
|
@ -190,7 +190,7 @@ __user foobar --password 'some_fancy_hash' --home /home/foobarexample
|
||||||
__user foobar --password 'some_other_hash'
|
__user foobar --password 'some_other_hash'
|
||||||
|
|
||||||
# this tells cdist, that you know that this is an override and should be accepted
|
# this tells cdist, that you know that this is an override and should be accepted
|
||||||
CDIST_ALLOW_OVERRIDE=yes __user foobar --password 'some_other_hash'
|
CDIST_OVERRIDE=yes __user foobar --password 'some_other_hash'
|
||||||
# its only an override, means the parameter --home is not touched
|
# its only an override, means the parameter --home is not touched
|
||||||
# and stay at the original value of /home/foobarexample
|
# and stay at the original value of /home/foobarexample
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue