forked from infra/ansible
34 lines
817 B
YAML
34 lines
817 B
YAML
|
---
|
||
|
|
||
|
- name: Install defined version of Home Assistant
|
||
|
ansible.builtin.pip:
|
||
|
name:
|
||
|
- wheel
|
||
|
- psycopg2
|
||
|
- packaging
|
||
|
- uv
|
||
|
- netifaces
|
||
|
- homeassistant=={{ ha_version }}
|
||
|
virtualenv: '{{ ha_venv_dir }}'
|
||
|
virtualenv_command: 'python{{ ha_python_version }} -m venv'
|
||
|
when: ha_version is defined
|
||
|
become: true
|
||
|
become_user: "{{ ha_user }}"
|
||
|
notify: Restart homeassistant
|
||
|
|
||
|
- name: Install latest version of Home Assistant
|
||
|
ansible.builtin.pip:
|
||
|
name:
|
||
|
- wheel
|
||
|
- psycopg2
|
||
|
- packaging
|
||
|
- uv
|
||
|
- homeassistant
|
||
|
extra_args: "--upgrade"
|
||
|
virtualenv: "{{ ha_venv_dir }}"
|
||
|
virtualenv_command: 'python{{ ha_python_version }} -m venv'
|
||
|
when: ha_version is undefined
|
||
|
become: true
|
||
|
become_user: "{{ ha_user }}"
|
||
|
notify: Restart homeassistant
|