Move use a variable to defin configuration directory
This commit is contained in:
parent
998dd554da
commit
f934c9392c
|
@ -3,6 +3,7 @@ homeassistant_become: true
|
|||
homeassistant_become_user: root
|
||||
|
||||
homeassistant_dir: /srv/homeassistant
|
||||
homeassistant_config_dir: /etc/homeassistant
|
||||
is_a_raspberrypi: false
|
||||
|
||||
homeassistant_add_to_ssl_cert_group: false
|
||||
|
|
|
@ -35,6 +35,14 @@
|
|||
getent:
|
||||
database: group
|
||||
|
||||
- name: ensure that {{ homeassistant_config_dir }} exists
|
||||
file:
|
||||
path: "{{ homeassistant_config_dir }}"
|
||||
state: directory
|
||||
owner: homeassistant
|
||||
group: root
|
||||
mode: "0750"
|
||||
|
||||
- name: add homeassistant user to ssl-cert group
|
||||
user:
|
||||
name: homeassistant
|
||||
|
@ -87,7 +95,7 @@
|
|||
|
||||
- name: add custom TLS settings in configuration.yaml
|
||||
blockinfile:
|
||||
path: "{{ homeassistant_dir }}/.homeassistant/configuration.yaml"
|
||||
path: "{{ homeassistant_config_dir }}/configuration.yaml"
|
||||
marker: "# {mark} ANSIBLE TLS SETTINGS"
|
||||
block: |
|
||||
http:
|
||||
|
|
|
@ -6,7 +6,7 @@ Wants=network-online.target
|
|||
|
||||
[Service]
|
||||
# WorkingDirectory={{ homeassistant_dir }}
|
||||
ExecStart={{ homeassistant_dir }}/bin/hass -c "{{ homeassistant_dir }}/.homeassistant"
|
||||
ExecStart={{ homeassistant_dir }}/bin/hass -c "{{ homeassistant_config_dir }}"
|
||||
User=homeassistant
|
||||
Group=homeassistant
|
||||
Restart=on-failure
|
||||
|
|
Loading…
Reference in a new issue