Feat: install nfs in home_autofs
This commit is contained in:
parent
c04d20c87f
commit
cdf95639e3
@ -4,6 +4,20 @@
|
||||
name: autofs
|
||||
state: present
|
||||
|
||||
- name: install nfs
|
||||
apt:
|
||||
pkg: nfs-kernel-server
|
||||
state: present
|
||||
when: ansible_distribution == 'Debian'
|
||||
notify: restart nfs
|
||||
|
||||
- name: install nfs
|
||||
pacman:
|
||||
pkg: nfs-utils
|
||||
state: present
|
||||
when: ansible_distribution != 'Debian'
|
||||
notify: restart nfs
|
||||
|
||||
- name: Create NAS share directory
|
||||
file:
|
||||
path: "/media/{{ item.host }}"
|
||||
@ -22,6 +36,12 @@
|
||||
dest: "/etc/autofs/auto.{{ item.host }}"
|
||||
with_items: "{{ autofs }}"
|
||||
|
||||
- name: Enable nfs daemon
|
||||
service:
|
||||
name: nfs
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: Enable autofs daemon
|
||||
service:
|
||||
name: autofs
|
||||
|
Loading…
Reference in New Issue
Block a user