2022-12-22 16:36:26 +00:00
|
|
|
defaults = {
|
|
|
|
'apt': {
|
|
|
|
'packages': {
|
2022-12-24 16:51:42 +00:00
|
|
|
'autoconf': {},
|
2022-12-22 16:36:26 +00:00
|
|
|
'bluez': {},
|
2022-12-24 16:51:42 +00:00
|
|
|
'build-essential': {},
|
2022-12-22 16:36:26 +00:00
|
|
|
'libffi-dev': {},
|
|
|
|
'libjpeg-dev': {},
|
|
|
|
'libopenjp2-7': {},
|
2022-12-24 16:51:42 +00:00
|
|
|
'libssl-dev': {},
|
2023-08-23 15:17:42 +00:00
|
|
|
'libtiff6': {},
|
2022-12-22 16:36:26 +00:00
|
|
|
'libturbojpeg0-dev': {},
|
2022-12-24 16:51:42 +00:00
|
|
|
'python3-packaging': {},
|
2022-12-22 16:36:26 +00:00
|
|
|
'tzdata': {},
|
2022-12-24 16:51:42 +00:00
|
|
|
'zlib1g-dev': {},
|
2022-12-22 16:36:26 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'backups': {
|
|
|
|
'paths': {
|
|
|
|
'/opt/homeassistant',
|
|
|
|
'/var/opt/homeassistant',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2023-08-23 15:17:42 +00:00
|
|
|
|
|
|
|
|
2022-12-22 16:53:10 +00:00
|
|
|
@metadata_reactor.provides(
|
2023-02-05 16:28:52 +00:00
|
|
|
'icinga2_api/homeassistant/services',
|
2022-12-22 16:53:10 +00:00
|
|
|
)
|
|
|
|
def icinga_check_for_new_release(metadata):
|
|
|
|
return {
|
|
|
|
'icinga2_api': {
|
|
|
|
'homeassistant': {
|
|
|
|
'services': {
|
|
|
|
'HOMEASSISTANT UPDATE': {
|
2023-09-09 14:54:33 +00:00
|
|
|
'check_interval': '60m',
|
2022-12-24 16:51:42 +00:00
|
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_homeassistant_update',
|
2022-12-22 16:53:10 +00:00
|
|
|
'vars.notification.mail': True,
|
2023-09-09 14:54:33 +00:00
|
|
|
'vars.sshmon_timeout': 20,
|
2022-12-22 16:53:10 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2023-08-23 15:17:42 +00:00
|
|
|
|
2022-12-22 16:53:10 +00:00
|
|
|
@metadata_reactor.provides(
|
|
|
|
'nginx/vhosts/homeassistant',
|
|
|
|
)
|
|
|
|
def nginx(metadata):
|
|
|
|
if not node.has_bundle('nginx'):
|
|
|
|
raise DoNotRunAgain
|
|
|
|
|
|
|
|
return {
|
|
|
|
'nginx': {
|
|
|
|
'vhosts': {
|
|
|
|
'homeassistant': {
|
|
|
|
'domain': metadata.get('homeassistant/domain'),
|
2023-01-29 06:03:28 +00:00
|
|
|
'website_check_path': '/auth/authorize',
|
|
|
|
'website_check_string': 'Home Assistant',
|
2022-12-22 16:53:10 +00:00
|
|
|
'locations': {
|
|
|
|
'/': {
|
|
|
|
'target': 'http://127.0.0.1:8123',
|
2022-12-22 19:01:35 +00:00
|
|
|
'websockets': True,
|
2022-12-22 16:53:10 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|