diff options
Diffstat (limited to 'roles/openshift_storage_nfs_lvm/tasks/nfs.yml')
-rw-r--r-- | roles/openshift_storage_nfs_lvm/tasks/nfs.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/openshift_storage_nfs_lvm/tasks/nfs.yml b/roles/openshift_storage_nfs_lvm/tasks/nfs.yml new file mode 100644 index 000000000..03f4fcec0 --- /dev/null +++ b/roles/openshift_storage_nfs_lvm/tasks/nfs.yml @@ -0,0 +1,26 @@ +--- +- name: Install NFS server + package: name=nfs-utils state=present + when: not openshift.common.is_containerized | bool + +- name: Start rpcbind + systemd: + name: rpcbind + state: started + enabled: yes + +- name: Start nfs + systemd: + 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 |