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_become_user: root
|
||||||
|
|
||||||
homeassistant_dir: /srv/homeassistant
|
homeassistant_dir: /srv/homeassistant
|
||||||
|
homeassistant_config_dir: /etc/homeassistant
|
||||||
is_a_raspberrypi: false
|
is_a_raspberrypi: false
|
||||||
|
|
||||||
homeassistant_add_to_ssl_cert_group: false
|
homeassistant_add_to_ssl_cert_group: false
|
||||||
|
|
|
@ -35,6 +35,14 @@
|
||||||
getent:
|
getent:
|
||||||
database: group
|
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
|
- name: add homeassistant user to ssl-cert group
|
||||||
user:
|
user:
|
||||||
name: homeassistant
|
name: homeassistant
|
||||||
|
@ -87,7 +95,7 @@
|
||||||
|
|
||||||
- name: add custom TLS settings in configuration.yaml
|
- name: add custom TLS settings in configuration.yaml
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: "{{ homeassistant_dir }}/.homeassistant/configuration.yaml"
|
path: "{{ homeassistant_config_dir }}/configuration.yaml"
|
||||||
marker: "# {mark} ANSIBLE TLS SETTINGS"
|
marker: "# {mark} ANSIBLE TLS SETTINGS"
|
||||||
block: |
|
block: |
|
||||||
http:
|
http:
|
||||||
|
|
|
@ -6,7 +6,7 @@ Wants=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# WorkingDirectory={{ homeassistant_dir }}
|
# WorkingDirectory={{ homeassistant_dir }}
|
||||||
ExecStart={{ homeassistant_dir }}/bin/hass -c "{{ homeassistant_dir }}/.homeassistant"
|
ExecStart={{ homeassistant_dir }}/bin/hass -c "{{ homeassistant_config_dir }}"
|
||||||
User=homeassistant
|
User=homeassistant
|
||||||
Group=homeassistant
|
Group=homeassistant
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
Loading…
Reference in New Issue