Merge "paunch: fail early if containers weren't deployed by Paunch before"

This commit is contained in:
Zuul 2020-02-20 22:24:47 +00:00 committed by Gerrit Code Review
commit f3729699ff

View File

@ -137,6 +137,18 @@ class PaunchManager:
self.module = module
self.results = results
# Fail early if containers were not deployed by Paunch before.
if os.path.isfile('/var/lib/tripleo-config/.ansible-managed'):
msg = ('Containers were previously deployed with '
'tripleo-ansible, paunch module can not be used. '
'Make sure EnablePaunch is set to False.')
self.module.fail_json(
msg=msg,
stdout='',
stderr='',
rc=1)
self.config = self.module.params['config']
if (isinstance(self.module.params['config_id'], list)
and len(self.module.params['config_id']) == 1):