Skip to content

Ansible role to install Home Assistant OS as a Proxmox VM

License

Notifications You must be signed in to change notification settings

nununo/ansible-role-proxmox-haos-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible role to install Home Assistant OS in Proxmox

Creates a VM in a Proxmox server and configures the latest release of Home Assistant Operating System as its boot disk.

This role was heavily inspired by this bash script. Thank you whiskerz007.

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

haos_proxmox_api_password: PLEASE_REDEFINE_ME
haos_proxmox_api_user: admin@pam

These are used for authentication. haos_proxmox_api_password is required and must always be redefined.

haos_proxmox_node: node

The name of the node in which the VM will be installed.

haos_proxmox_storage: local-zfs

The storage location where the VM disks (EFI and HAOS image) will be created. Currently only three storage types are supported: ZFS, LVM Thin and directory.

haos_proxmox_cores: 1
haos_proxmox_description: 'Home Assistant'
haos_proxmox_mac_address: '' # If left empty a new one will be generated
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

Several VM attributes.

Dependencies

None.

Note: While the role doesn't depend on any other roles, it uses json_query() which runs in your local machine and requires jmespath to be installed locally.

Ansible Galaxy Installation

ansible-galaxy install nununo.proxmox_haos_install

Example Playbook

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

Example of inventory entry:

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

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: myhomeassistsant
haos_proxmox_node: myproxmoxnode
haos_proxmox_storage: local-zfs

This role needs sudo capabilities.

License

MIT / BSD

Author Information

This role was created in 2022 by Nuno Godinho.

About

Ansible role to install Home Assistant OS as a Proxmox VM

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages