nununo.proxmox_haos_install

Ansible Role to Install Home Assistant OS on Proxmox

This role sets up a virtual machine (VM) on a Proxmox server and installs the latest version of the Home Assistant Operating System as its primary disk.

This role is based on ideas from this bash script. Thanks to whiskerz007 for the inspiration!

Requirements

No specific requirements.

Role Variables

Below are the variables you can use, along with their default values (found in defaults/main.yml):

haos_proxmox_api_password: PLEASE_REDEFINE_ME
haos_proxmox_api_user: admin@pam

These variables are for logging in. You must redefine haos_proxmox_api_password.

haos_proxmox_node: node

Name of the node where the VM will be created.

haos_proxmox_storage: local-zfs

Where the VM will save its disks (EFI and HAOS image). Only ZFS, LVM Thin, and directory storage types are supported.

haos_proxmox_cores: 1
haos_proxmox_description: 'Home Assistant'
haos_proxmox_mac_address: '' # A new one will be created if left empty
haos_proxmox_memory: 4096
haos_proxmox_name: homeassistant
haos_proxmox_onboot: true
haos_proxmox_protection: true
haos_proxmox_sockets: 1
haos_proxmox_storage: local-lvm
haos_proxmox_storage_interface: sata0

These are other settings for the VM.

Dependencies

No dependencies.

Note: This role does not rely on other roles but uses json_query(), which requires the jmespath tool installed on your local machine.

Installing from Ansible Galaxy

ansible-galaxy install nununo.proxmox_haos_install

Example Playbook

- hosts: myproxmox.mydomain.com
  roles:
  - role: nununo.proxmox_haos_install

Example of how to list the inventory:

myhomeassistant.mydomain.com ansible_host=10.0.0.10 # (IP of Proxmox)

Example of host variables in /host_vars/myhomeassistant.mydomain.com/vars.yml:

haos_proxmox_api_password: ENCRYPTED_PROXMOX_API_PASSWORD
haos_proxmox_api_user: root@pam
haos_proxmox_description: "MyHomeAssistant"
haos_proxmox_mac_address: 'AB:CD:EF:12:34:56'
haos_proxmox_name: myhomeassistant
haos_proxmox_node: myproxmoxnode
haos_proxmox_storage: local-zfs

This role requires sudo privileges.

License

MIT / BSD

Author Information

This role was created in 2022 by Nuno Godinho.

Informazioni sul progetto

Installs Home Assistant Operating System in a new Proxmox VM.

Installa
ansible-galaxy install nununo.proxmox_haos_install
Licenza
mit
Download
251
Proprietario