[ussuri] paunch: exit module if config doesn't exist
It's possible that the step directory doesn't exist in a deployment, just quit the module with no change and move on. It'll avoid running paunch with empty config. This will be backported to Train. Change-Id: I3a5fc2214e7068f1e7aacc0e7a8a681c3f9715e9
This commit is contained in:
parent
ce2a0865b2
commit
b2fe3f2d61
|
@ -178,6 +178,9 @@ class PaunchManager:
|
|||
log_file=self.log_file)
|
||||
|
||||
if self.config:
|
||||
# Do nothing if config path doesn't exist
|
||||
if not os.path.exists(self.config):
|
||||
self.module.exit_json(**self.results)
|
||||
if self.config.endswith('.json'):
|
||||
self.module.warn('Only one config was given, cleanup disabled')
|
||||
self.cleanup = False
|
||||
|
|
Loading…
Reference in New Issue