Feat(autofs): itemize it
This commit is contained in:
@@ -6,18 +6,21 @@
|
||||
|
||||
- name: Create NAS share directory
|
||||
file:
|
||||
path: /media/Raisin
|
||||
path: "/media/{{ item.host }}"
|
||||
state: directory
|
||||
with_items: "{{ autofs }}"
|
||||
|
||||
- name: Activate NAS shares for autofs
|
||||
lineinfile:
|
||||
path: /etc/autofs/auto.master
|
||||
line: '/media/raisin /etc/autofs/auto.raisin --timeout=60 --browse'
|
||||
line: "/media/{{ item.host }} /etc/autofs/auto.{{ item.host }} --timeout=60 --browse"
|
||||
with_items: "{{ autofs }}"
|
||||
|
||||
- name: NAS autofs config file
|
||||
template:
|
||||
src: files/autofs.raisin
|
||||
dest: /etc/autofs/auto.raisin
|
||||
src: "files/autofs.{{ item.host }}"
|
||||
dest: "/etc/autofs/auto.{{ item.host }}"
|
||||
with_items: "{{ autofs }}"
|
||||
|
||||
- name: Enable autofs daemon
|
||||
service:
|
||||
|
Reference in New Issue
Block a user