basic: cleanup bundle for usage in this repo

This commit is contained in:
Rico 2021-12-21 17:06:27 +01:00
parent 028aeef8db
commit 2c23704f08
Signed by: stillbeben
GPG key ID: AE1066B5BD0B5041

View file

@ -42,18 +42,6 @@ actions = {
description = []
if not node.metadata.get('icinga_options/exclude_from_monitoring', False):
description.append('icingaweb2: https://icinga.kunsmann.eu/monitoring/host/show?host={}'.format(node.name))
if node.has_bundle('telegraf'):
description.append('Grafana: https://grafana.kunsmann.eu/d/{}'.format(UUID(int=node.magic_number).hex[:10]))
if (
not node.metadata.get('icinga_options/exclude_from_monitoring', False) or
node.has_bundle('telegraf')
):
description.append('') # divider line
if node.metadata.get('nginx/vhosts', {}):
description.append('nginx vhosts:')
@ -74,15 +62,3 @@ if node.metadata.get('nginx/vhosts', {}):
if node.metadata.get('description', []):
description.append('') # divider line
for line in node.metadata.get('description', []):
description.append('# {}'.format(italic(line)))
if description:
files['/etc/node.description'] = {
'content': '\n'.join(description) + '\n',
}
else:
files['/etc/node.description'] = {
'delete': True,
}