Files
ansible/home_assistant.yaml

29 lines
859 B
YAML

- name: Setup Home Assistant
hosts: podman1
become: true
become_user: root
tasks:
- name: Pull Home Assistant image
containers.podman.podman_image:
name: ghcr.io/home-assistant/home-assistant:stable
- name: Create network for iot interface
containers.podman.podman_network:
name: iot
macvlan: eth1
- name: Create config directory
ansible.builtin.file:
path: /var/homeassistant
state: directory
- name: Create Home Assistant Container
containers.podman.podman_container:
name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
recreate: true
restart: true
restart_policy: "unless-stopped"
network: iot
privileged: true
state: started
volumes:
- "/var/homeassistant:/config"