summaryrefslogtreecommitdiffstats
path: root/ansible/node/roles/nas/tasks/redhat/nfs.yml
blob: 4dc1d7c0f1f977ee8519d0a3d53e053fc5ef46c5 (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
30
31
---
- name: install NFS packages
  package:
    name: nfs-utils
    state: present

- name: ensure NFS does not autostart
  service:
    name: "{{ s }}"
    enabled: no
  with_list:
    - nfs
    - nfslock
  loop_control:
    loop_var: s

- name: generate NFS configuration
  template:
    src: nfs_sysconfig.j2
    dest: /etc/sysconfig/nfs

- name: check if /etc/sysconfig/rpc-rquotad exists
  stat:
    path: /etc/sysconfig/rpc-rquotad
  register: sysconfig_rpc_rquotad

- name: generate quota configuration file
  file:
    src: rpc-rquotad.sysconfig
    path: /etc/sysconfig/rpc-rquotad
  when: sysconfig_rpc_rquotad.stat.exists