Ansible_workstation/roles/workstation/tasks/home_mounts.yml

19 lines
498 B
YAML
Raw Normal View History

2022-01-10 04:26:00 +00:00
---
- name: Create NAS share directory
file:
path: "/media/{{ item.host }}"
state: directory
with_items: "{{ autofs }}"
- name: Activate NAS shares for autofs
lineinfile:
path: /etc/autofs/auto.master
line: "/media/{{ item.host }} /etc/autofs/auto.{{ item.host }} --timeout=60 --browse"
with_items: "{{ autofs }}"
- name: NAS autofs config file
template:
src: "files/autofs.{{ item.host }}"
dest: "/etc/autofs/auto.{{ item.host }}"
with_items: "{{ autofs }}"