---
- name: Reload apache
  systemd:
    name: apache2
    state: reloaded

- name: Restart apache
  systemd:
    name: apache2
    state: restarted

- name: Restart autofs
  systemd:
    name: autofs
    state: restarted

- name: Restart homeassistant
  uri:
    url: https://hass.rewse.jp/api/services/homeassistant/restart
    method: POST
    headers:
      Authorization: Bearer {{ homeassistant_token }}

---
- name: Reload apache
  systemd:
    name: apache2
    state: reloaded

- name: Restart apache
  systemd:
    name: apache2
    state: restarted

- name: Restart autofs
  systemd:
    name: autofs
    state: restarted

- name: Restart homeassistant
  uri:
    url: https://hass.rewse.jp/api/services/homeassistant/check_config
    method: POST
    headers:
      Authorization: Bearer {{ homeassistant_token }}
  uri:
    url: https://hass.rewse.jp/api/services/homeassistant/restart
    method: POST
    headers:
      Authorization: Bearer {{ homeassistant_token }}

Add check_config to Restart homeassistant
Add check_config to Restart homeassistant
