blob: 3070de495ff5c474c0b4c8b8c576f0e33f209dfa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
---
- name: setup firewall
include: firewall.yml
static: yes
- name: Install nfs-utils
package: name=nfs-utils state=present
- name: Configure NFS
lineinfile:
dest: /etc/sysconfig/nfs
regexp: '^RPCNFSDARGS=.*$'
line: 'RPCNFSDARGS="-N 2 -N 3"'
register: nfs_config
- name: Restart nfs-config
systemd: name=nfs-config state=restarted
when: nfs_config | changed
- name: Ensure exports directory exists
file:
path: "{{ l_nfs_base_dir }}"
state: directory
- name: Enable and start NFS services
systemd:
name: nfs-server
state: started
enabled: yes
|