2021-10-31 08:43:53 +00:00
|
|
|
defaults = {
|
|
|
|
'apt': {
|
|
|
|
'packages': {
|
2022-11-06 17:52:14 +00:00
|
|
|
'openjdk-17-jre': {},
|
2021-10-31 08:43:53 +00:00
|
|
|
'openhab': {
|
|
|
|
'needs': {
|
2022-11-06 17:52:14 +00:00
|
|
|
'pkg_apt:openjdk-17-jre',
|
2021-10-31 08:43:53 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'openhab-addons': {
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:openhab',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'repos': {
|
|
|
|
'openhab': {
|
|
|
|
'items': {
|
|
|
|
'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'backups': {
|
|
|
|
'paths': {
|
2022-01-24 06:28:26 +00:00
|
|
|
'/usr/share/openhab/addons', # not included in openhab backup
|
2021-10-31 08:43:53 +00:00
|
|
|
'/var/lib/openhab',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
|
|
'nginx/vhosts/openhab',
|
|
|
|
)
|
|
|
|
def nginx(metadata):
|
|
|
|
if not node.has_bundle('nginx'):
|
|
|
|
raise DoNotRunAgain
|
|
|
|
|
|
|
|
return {
|
|
|
|
'nginx': {
|
|
|
|
'vhosts': {
|
|
|
|
'openhab': {
|
|
|
|
'domain': metadata.get('openhab/domain'),
|
|
|
|
'locations': {
|
|
|
|
'/': {
|
|
|
|
'target': 'http://localhost:22090/',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'website_check_path': '/',
|
2021-10-31 09:31:13 +00:00
|
|
|
'website_check_string': 'openHAB',
|
2021-10-31 08:43:53 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|