Feat: move autofs to workstation

This commit is contained in:
2022-01-10 05:26:00 +01:00
parent 8927cc07e6
commit 4bd12d5001
4 changed files with 47 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
---
- 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 }}"