summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_nfs_lvm/tasks/nfs.yml
blob: bf23dfe985291ceb819258144c9519bc23b5342b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
- name: Install NFS server
  yum: name=nfs-utils state=present
  when: ansible_pkg_mgr == "yum"

- name: Install NFS server
  dnf: name=nfs-utils state=present
  when: ansible_pkg_mgr == "dnf"

- name: Start rpcbind
  service: name=rpcbind state=started enabled=yes

- name: Start nfs
  service: name=nfs-server state=started enabled=yes

- name: Export the directories
  lineinfile: dest=/etc/exports
              regexp="^{{ osnl_mount_dir }}/{{ item }} "
              line="{{ osnl_mount_dir }}/{{ item }} {{osnl_nfs_export_options}}"
  with_sequence: start={{osnl_volume_num_start}} count={{osnl_number_of_volumes}} format={{osnl_volume_prefix}}{{osnl_volume_size}}g%04d
  notify: restart nfs