Add home assistant podman setup
This commit is contained in:
28
home_assistant.yaml
Normal file
28
home_assistant.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
- 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"
|
||||
@@ -8,6 +8,24 @@ devops_servers:
|
||||
devops_1:
|
||||
ansible_host: devops-1.malcolms.xyz
|
||||
|
||||
hypervisors:
|
||||
hosts:
|
||||
PMX1:
|
||||
ansible_host: 10.2.2.1
|
||||
ansible_user: root
|
||||
PMX2:
|
||||
ansible_host: 10.2.2.2
|
||||
ansible_user: root
|
||||
PMX3:
|
||||
ansible_host: 10.2.2.3
|
||||
ansible_user: root
|
||||
|
||||
container_servers:
|
||||
hosts:
|
||||
podman1:
|
||||
ansible_host: 10.2.3.1
|
||||
ansible_user: root
|
||||
|
||||
all_servers:
|
||||
children:
|
||||
minecraft_servers:
|
||||
|
||||
Reference in New Issue
Block a user