2020-01-22 23:29:44 +01:00
---
2021-03-14 18:12:08 +01:00
title: homeassistant_docker
2020-01-22 23:29:44 +01:00
type: docs
---
2022-06-20 22:33:32 +02:00
[![Source Code ](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white )](https://gitea.rknet.org/ansible/xoxys.homeassistant_docker) [![Build Status ](https://img.shields.io/drone/build/ansible/xoxys.homeassistant_docker?logo=drone&server=https%3A%2F%2Fdrone.rknet.org )](https://drone.rknet.org/ansible/xoxys.homeassistant_docker) [![License: MIT ](https://img.shields.io/badge/license-MIT-blue.svg )](https://gitea.rknet.org/ansible/xoxys.homeassistant_docker/src/branch/main/LICENSE)
2020-01-31 11:34:10 +01:00
Setup [Home Assistant ](https://www.home-assistant.io/ ) server. Open source home automation that puts local control and privacy first.
2020-01-22 23:29:44 +01:00
2022-06-20 22:33:32 +02:00
<!-- more -->
2022-03-03 21:27:39 +01:00
- [Default Variables ](#default-variables )
- [homeassistant_cap_add ](#homeassistant_cap_add )
- [homeassistant_cap_drop ](#homeassistant_cap_drop )
- [homeassistant_cmdline_content ](#homeassistant_cmdline_content )
- [homeassistant_cmdline_override_enabled ](#homeassistant_cmdline_override_enabled )
- [homeassistant_container_name ](#homeassistant_container_name )
- [homeassistant_cpu_shares ](#homeassistant_cpu_shares )
- [homeassistant_data_dir ](#homeassistant_data_dir )
- [homeassistant_devices ](#homeassistant_devices )
- [homeassistant_exclude_modemmanager ](#homeassistant_exclude_modemmanager )
- [homeassistant_exposed_ports ](#homeassistant_exposed_ports )
- [homeassistant_extra_hosts ](#homeassistant_extra_hosts )
- [homeassistant_image ](#homeassistant_image )
- [homeassistant_memory_limit ](#homeassistant_memory_limit )
- [homeassistant_memory_reservation ](#homeassistant_memory_reservation )
- [homeassistant_networks ](#homeassistant_networks )
- [homeassistant_networks_applied ](#homeassistant_networks_applied )
- [homeassistant_pids_limit ](#homeassistant_pids_limit )
- [homeassistant_plugin_dir ](#homeassistant_plugin_dir )
- [homeassistant_plugins ](#homeassistant_plugins )
- [homeassistant_restart_policy ](#homeassistant_restart_policy )
- [homeassistant_security_opt ](#homeassistant_security_opt )
- [homeassistant_serial_device ](#homeassistant_serial_device )
- [homeassistant_service_directory ](#homeassistant_service_directory )
- [homeassistant_service_stopped ](#homeassistant_service_stopped )
- [homeassistant_timezone ](#homeassistant_timezone )
- [homeassistant_version ](#homeassistant_version )
- [homeassistant_volumes ](#homeassistant_volumes )
- [Dependencies ](#dependencies )
2020-01-22 23:29:44 +01:00
---
## Default Variables
2021-03-14 18:12:08 +01:00
### homeassistant_cap_add
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_cap_add: []
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_cap_drop
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_cap_drop: []
2020-01-22 23:29:44 +01:00
```
### homeassistant_cmdline_content
#### Default value
```YAML
homeassistant_cmdline_content: console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline
rootwait
```
### homeassistant_cmdline_override_enabled
Override `/boot/cmdline.txt` with given conten. This can be necessary if you use searial hardware, but be careful! Wrong configuration may leave your system unusable!
#### Default value
```YAML
homeassistant_cmdline_override_enabled: false
```
2021-03-14 18:12:08 +01:00
### homeassistant_container_name
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_container_name: homeassistant
```
### homeassistant_cpu_shares
#### Default value
```YAML
homeassistant_cpu_shares: _unset_
```
#### Example usage
```YAML
homeassistant_cpu_shares: '1024'
```
2021-04-17 14:19:59 +02:00
### homeassistant_data_dir
#### Default value
```YAML
homeassistant_data_dir: /opt/homeassistant/config
```
2021-03-14 18:12:08 +01:00
### homeassistant_devices
Define required devices e.g. `/dev/ttyACM0` .
#### Example usage
```YAML
homeassistant_devices:
- src: "{{ homeassistant_serial_port }}"
dest: "{{ homeassistant_serial_port }}"
opt: z
2020-01-22 23:29:44 +01:00
```
### homeassistant_exclude_modemmanager
Prevent ModemManger from binding to serial devices and therefor blocking controllers like a `CC2531` . Devices can be skipped by a udev rule.
#### Default value
```YAML
homeassistant_exclude_modemmanager: false
```
2021-03-14 18:12:08 +01:00
### homeassistant_exposed_ports
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_exposed_ports: []
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_extra_hosts
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_extra_hosts: []
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_image
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_image: homeassistant/home-assistant:{{ homeassistant_version }}
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_memory_limit
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_memory_limit: _unset_
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
#### Example usage
```YAML
homeassistant_memory_limit: 512m
```
### homeassistant_memory_reservation
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_memory_reservation: _unset_
```
#### Example usage
```YAML
homeassistant_memory_reservation: 256m
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_networks
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_networks:
- name: default
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
#### Example usage
```YAML
homeassistant_networks:
- name: default
# optional network driver, defaults to 'bride'
driver: host
external: false
```
### homeassistant_networks_applied
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_networks_applied:
- default
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_pids_limit
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_pids_limit: _unset_
2020-01-22 23:29:44 +01:00
```
2021-04-17 14:19:59 +02:00
### homeassistant_plugin_dir
#### Default value
```YAML
homeassistant_plugin_dir: /opt/homeassistant/config/www/plugins
```
### homeassistant_plugins
Plugins will be downloaded to `homeassistant_plugin_dir` and need to be a single raw file.
#### Default value
```YAML
homeassistant_plugins: []
```
#### Example usage
```YAML
homeassistant_plugins:
- name: button-card.js
url: https://github.com/custom-cards/button-card/releases/download/v3.4.2/button-card.js
- name: card-tools.js
url: https://raw.githubusercontent.com/thomasloven/lovelace-card-tools/11/card-tools.js
```
2021-03-14 18:12:08 +01:00
### homeassistant_restart_policy
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_restart_policy: always
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_security_opt
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_security_opt: []
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_serial_device
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_serial_device:
- vendor_id: '0000'
product_id: xxxx
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_service_directory
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_service_directory: /var/lib/docker/services/homeassistant
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_service_stopped
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_service_stopped: false
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_timezone
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_timezone: Europe/Berlin
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_version
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_version: latest
2020-01-22 23:29:44 +01:00
```
2021-03-14 18:12:08 +01:00
### homeassistant_volumes
Define required docker volumes.
2020-01-22 23:29:44 +01:00
#### Default value
```YAML
2021-03-14 18:12:08 +01:00
homeassistant_volumes:
2021-04-17 14:19:59 +02:00
- name: '{{ homeassistant_data_dir }}'
2021-03-14 18:12:08 +01:00
dest: /config
bind: true
```
#### Example usage
```YAML
homeassistant_volumes:
# Instead of the name you could specify a path on the container host system,
# but you also have to enable bind mount for this volume
- name: data
# target location inside the container
dest: /var/www/app/data
# enable bind mount, if false volume will be configured as named volume
# keep in mind you MUST set bind in any case
bind: True
# Options for bind mounts
bind_opt: "ro,z"
2020-01-22 23:29:44 +01:00
```
2022-03-03 21:27:39 +01:00
2020-01-22 23:29:44 +01:00
## Dependencies
None.