overall better handling and usage of exceptions
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
5d5930265a
commit
f8bbe00d47
21 changed files with 57 additions and 28 deletions
|
@ -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': {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue