summaryrefslogtreecommitdiffstats
path: root/roles/kube_nfs_volumes/tasks/nfs.yml
blob: 87cf5f9a4a5d0b3f2a30aa2e1266862d268c6802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
- name: Install NFS server on Fedora/Red Hat
  yum: name=nfs-utils state=installed

- name: Start rpcbind on Fedora/Red Hat
  service: name=rpcbind state=started enabled=yes

- name: Start nfs on Fedora/Red Hat
  service: name=nfs-server state=started enabled=yes

- name: Export the directories
  lineinfile: dest=/etc/exports
              regexp="^{{ mount_dir }}/{{ item.name }} "
              line="{{ mount_dir }}/{{ item.name }} {{nfs_export_options}}"
  with_items: partition_pool
  notify: restart nfs