infrastructure/ansible/roles/restic/tasks/homeassistant.yml
Jake Howard 57ad143268
Some checks failed
/ terraform (push) Successful in 38s
/ ansible (push) Failing after 1m40s
Set password for homeassistant SMB mount
It had an IP restriction, but still
2024-01-03 21:23:49 +00:00

29 lines
690 B
YAML

- name: Install CIFS utils
package:
name: cifs-utils
become: true
- name: Create dir for CIFS mount
file:
path: /mnt/home-assistant
state: directory
mode: "0755"
become: true
- name: Create dir for each CIFS mount
file:
path: /mnt/home-assistant/{{ item }}
state: directory
mode: "0600"
become: true
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
become: true
loop: "{{ restic_homeassistant_mounts }}"