Compare commits

...

4 Commits

6 changed files with 78 additions and 2 deletions

View File

@ -1 +0,0 @@
This system is managed using bundlewrap.

View File

@ -1,3 +1,8 @@
from inspect import cleandoc
from uuid import UUID
from bundlewrap.utils.text import italic
# TODO support non-systemd systems
files = {
@ -13,7 +18,9 @@ files = {
'/etc/htoprc.global': {
'source': 'htoprc',
},
'/etc/motd': {},
'/etc/motd': {
'content': '',
},
}
locale_needs = set()
@ -34,3 +41,50 @@ actions = {
'command': 'locale-gen',
},
}
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:')
for vname, vconfig in sorted(node.metadata.get('nginx/vhosts', {}).items()):
if vconfig.get('ssl', 'letsencrypt') is not None:
proto = 'https'
else:
proto = 'http'
domain = vconfig.get('domain', vname)
description.append(' {}: {}://{}{}'.format(
vname,
proto,
domain,
vconfig.get('website_check_path', '/'),
))
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,
}

View File

@ -81,6 +81,7 @@ files = {
'/usr/local/share/icinga/plugins/check_sipgate_account_balance': {
'mode': '0755',
'content_type': 'mako',
'cascade_skip': False, # contains faults
},
'/usr/local/share/icinga/plugins/check_freifunk_node': {
'mode': '0755',

View File

@ -21,6 +21,13 @@ case $TERM in
;;
esac
if [[ -f "/etc/node.description" ]]
then
echo
cat "/etc/node.description"
echo
fi
uptime
last | grep 'still logged in'

View File

@ -26,6 +26,10 @@ nodes['aurto'] = {
'imap_pass': bwpass.attr('t-online.de/franzi.kunsmann@t-online.de', 'imap'),
},
},
'description': [
'When adding packages to aurto, please also add those packages to ~/PACKAGES',
'Wenn Pakete zu aurto hinzugefügt werden, trage sie bitte auch in ~/PACKAGES ein',
],
'interfaces': {
'enp1s0': {
'ips': {

View File

@ -31,6 +31,17 @@ nodes['home.nas'] = {
'packages': {
'mpv': {},
'youtube-dl': {},
# for compiling yate
'autoconf': {},
'subversion': {},
# svn checkout http://yate.null.ro/svn/yate/tags/RELEASE_6_4_0/ .
# ./autogen.sh
# ./configure --prefix=/opt/yate
# make -j8
# systemctl stop yate
# make install-noconf
# systemctl start yate
},
},
'backups': {