infrastructure/ansible/roles/restic/tasks/homeassistant.yml
Jake Howard d5a7a61171
All checks were successful
/ terraform (push) Successful in 38s
/ ansible (push) Successful in 1m30s
Remove unnecessary use of become from some roles
This should make execution much faster
2024-09-09 17:09:03 +01:00

25 lines
630 B
YAML

- 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 }}"