21 lines
466 B
YAML
21 lines
466 B
YAML
|
---
|
||
|
|
||
|
- name: Apt install NFS server
|
||
|
apt:
|
||
|
name: nfs-kernel-server
|
||
|
update_cache: yes
|
||
|
- name: Ensure correct entry in /etc/exports
|
||
|
lineinfile:
|
||
|
path: /etc/exports
|
||
|
state: present
|
||
|
line: "{{ item }}"
|
||
|
with_items:
|
||
|
- '/data/main 192.168.178.0/255.255.255.0(rw,async,no_subtree_check)'
|
||
|
- name: Restart nfs-kernel-server.service
|
||
|
ansible.builtin.systemd:
|
||
|
daemon_reload: yes
|
||
|
state: started
|
||
|
name: nfs-kernel-server.service
|
||
|
|
||
|
|