Feat: install nfs in home_autofs

This commit is contained in:
Bertrand Benjamin 2020-01-02 07:59:40 +01:00
parent c04d20c87f
commit cdf95639e3
1 changed files with 20 additions and 0 deletions

View File

@ -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