2022-01-24 22:18:15 +01:00
|
|
|
- name: Install dependencies.
|
|
|
|
ansible.builtin.package:
|
|
|
|
name:
|
|
|
|
- python3
|
|
|
|
- python3-dev
|
|
|
|
- python3-venv
|
2022-01-25 10:33:49 +01:00
|
|
|
- python3-virtualenv
|
2022-01-24 22:18:15 +01:00
|
|
|
- python3-pip
|
|
|
|
- libffi-dev
|
|
|
|
- libssl-dev
|
|
|
|
- libjpeg-dev
|
|
|
|
- zlib1g-dev
|
|
|
|
- autoconf
|
|
|
|
- build-essential
|
|
|
|
- libopenjp2-7
|
|
|
|
- libtiff5
|
|
|
|
- libturbojpeg0
|
|
|
|
- tzdata
|
|
|
|
|
|
|
|
- name: Install home-assistant
|
|
|
|
ansible.builtin.pip:
|
|
|
|
name: homeassistant
|
|
|
|
virtualenv: /srv/homeassistant
|
|
|
|
|
2022-01-25 10:33:49 +01:00
|
|
|
- name: Fix permissions.
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /srv/homeassistant
|
|
|
|
state: directory
|
|
|
|
owner: homeassistant
|
|
|
|
group: homeassistant
|
|
|
|
recurse: yes
|
|
|
|
|
2022-01-24 22:18:15 +01:00
|
|
|
- name: Create home-assistant systemd service.
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: homeassistant.service
|
|
|
|
dest: /etc/systemd/system/homeassistant.service
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
- name: Enable homeassistant service.
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: homeassistant
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2022-01-25 10:33:49 +01:00
|
|
|
daemon-reload: yes
|