47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
from shlex import quote
|
|
|
|
|
|
version = node.metadata.get('homeassistant/os_agent_version')
|
|
|
|
directories = {
|
|
'/usr/share/hassio': {},
|
|
}
|
|
|
|
actions = {
|
|
'install_os_agent': {
|
|
'command': ' && '.join([
|
|
f'wget -O /tmp/os-agent.deb https://github.com/home-assistant/os-agent/releases/download/{quote(version)}/os-agent_{quote(version)}_linux_aarch64.deb',
|
|
'DEBIAN_FRONTEND=noninteractive dpkg -i /tmp/os-agent.deb',
|
|
]),
|
|
'unless': f'test "$(apt -qq list os-agent | cut -d" " -f2)" = "{quote(version)}"',
|
|
},
|
|
}
|
|
|
|
# svc_systemd = {
|
|
# 'docker.service': {
|
|
# 'needs': [
|
|
# 'pkg_apt:docker-ce',
|
|
# 'pkg_apt:docker-ce-cli',
|
|
# 'pkg_apt:containerd.io',
|
|
# 'pkg_apt:docker-buildx-plugin',
|
|
# 'pkg_apt:docker-compose-plugin',
|
|
# ],
|
|
# },
|
|
# }
|
|
|
|
|
|
# TODO: keep up to date:
|
|
# https://github.com/home-assistant/os-agent/releases/latest
|
|
|
|
|
|
|
|
|
|
# direct link to latest version download: https://github.com/home-assistant/os-agent/releases/download/latest/os-agent_latest_linux_aarch64.deb
|
|
|
|
|
|
# TODO: keep NetworkManager
|
|
|
|
|
|
# https://github.com/home-assistant/supervised-installer?tab=readme-ov-file
|
|
# https://github.com/home-assistant/os-agent/tree/main?tab=readme-ov-file#using-home-assistant-supervised-on-debian
|
|
# https://docs.docker.com/engine/install/debian/
|