openhab wip

This commit is contained in:
mwiegand 2021-10-29 10:43:14 +02:00
parent d2a802524d
commit f6ac34dfd0
4 changed files with 44 additions and 11 deletions

View file

@ -1,16 +1,24 @@
assert node.os == 'debian'
if node.os_version == (10,):
version = 11
elif node.os_version == (11,):
version = 17
else:
raise Exception('java bundle doesnt support this os and version')
defaults = {
'java': {
'version': {
10: 11,
11: 17,
}[node.os_version[0]],
},
}
@metadata_reactor.provides(
'apt/packages',
)
def apt(metadata):
return {
'apt': {
'packages': {
f'openjdk-{version}-jre': {},
f'openjdk-{metadata.get("java/version")}-jre': {},
}
}
}
}

View file

@ -1,5 +1,23 @@
directories = {
'/var/lib/openhab': {
'owner': 'openhab',
'group': 'openhab',
'needs': [
'zfs_dataset:tank/openhab',
'pkg_apt:openhab',
],
'triggers': [
'svc_systemd:openhab:restart',
],
}
}
svc_systemd = {
'openhab': {
'needs': [
'pkg_apt:openhab',
'directory:/var/lib/openhab',
],
}
}

View file

@ -1,7 +1,11 @@
defaults = {
'apt': {
'packages': {
'openhab': {},
'openhab': {
'needs': [
'zfs_dataset:tank/openhab',
],
},
},
'sources': {
'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main',

View file

@ -19,6 +19,9 @@
'gateway4': '10.0.0.1',
},
},
'java': {
'version': 11,
},
'zfs': {
'pools': {
'tank': {