fix: create chaos .env files

This commit is contained in:
Moritz 2024-04-16 17:00:51 +02:00
parent fe9abf4cfd
commit d3c7ad78c7
1 changed files with 5 additions and 3 deletions

View File

@ -211,7 +211,11 @@ def new_app(recipe, domain, server, version):
print(f'remove {path}')
path.unlink()
logging.info(f'create {recipe} config on {server} at {domain}')
out = abra("app", "new", recipe, "-n", "-s", server, "-D", domain, version)
chaos = ''
if version in ['chaos', None]:
version = ''
chaos = '-C'
out = abra("app", "new", recipe, chaos, "-n", "-s", server, "-D", domain, version)
if not "app has been created" in out:
raise RuntimeError(f'App "{recipe}" creation failed')
else:
@ -462,8 +466,6 @@ def config(apps):
path = get_env_path(server, domain)
version = app_config.get('version')
print(f'Setup {app} ({version}) config on {server} at {domain}')
if version in ['chaos', None]:
version = ''
new_app(app, domain, server, version)
logging.info(f'set configs for {app} at {instance}')
update_configs(path, app_config)