overall better handling and usage of exceptions
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-04-02 18:57:13 +02:00
parent 5d5930265a
commit f8bbe00d47
Signed by: kunsi
GPG key ID: 12E3D2136B818350
21 changed files with 57 additions and 28 deletions

View file

@ -1,6 +1,13 @@
assert not node.has_bundle('apt'), f'{node.name} - bundle:apt is incompatible with ansible managed c3voc hosts'
assert not node.has_bundle('nginx'), f'{node.name} - bundle:nginx is incompatible with ansible managed c3voc hosts'
assert not node.has_bundle('users'), f'{node.name} - bundle:users is incompatible with ansible managed c3voc hosts'
from bundlewrap.exceptions import BundleError
CONFLICTING_BUNDLES = {
'apt',
'nginx',
'users',
}
if any(node.has_bundle(i) for i in CONFLICTING_BUNDLES):
raise BundleError(f'{node.name}: bundle:c3voc-addons conflicts with bundles: {", ".join(sorted(CONFLICTING_BUNDLES))}')
pkg_apt = {
'apt-transport-https': {},