infrastructure/ansible/roles/restic/tasks/homeassistant.yml

26 lines
630 B
YAML
Raw Permalink Normal View History

- name: Install CIFS utils
package:
name: cifs-utils
- name: Create dir for CIFS mount
file:
path: /mnt/home-assistant
state: directory
mode: "0755"
- name: Create dir for each CIFS mount
file:
path: /mnt/home-assistant/{{ item }}
state: directory
mode: "0600"
loop: "{{ restic_homeassistant_mounts }}"
- name: Create mounts
mount:
path: /mnt/home-assistant/{{ item }}
fstype: cifs
opts: username=homeassistant,password={{ vault_homeassistant_smb_password }}
src: //{{ pve_hosts.homeassistant.ip }}/{{ item }}
state: mounted
loop: "{{ restic_homeassistant_mounts }}"