diff options
author | Jan Safranek <jsafrane@redhat.com> | 2015-05-20 11:40:35 +0200 |
---|---|---|
committer | Jan Safranek <jsafrane@redhat.com> | 2015-05-20 11:40:35 +0200 |
commit | 98acbb6d24921ded065fca3b57943ef1ae7fb15f (patch) | |
tree | 17571cd1d1ef49cc81b9dcd8f1684ff65c30e37f /roles/kube_nfs_volumes/tasks/nfs.yml | |
parent | 8dedb32348549d8aa279201cfb89c50d5dc83ba5 (diff) | |
download | openshift-98acbb6d24921ded065fca3b57943ef1ae7fb15f.tar.gz openshift-98acbb6d24921ded065fca3b57943ef1ae7fb15f.tar.bz2 openshift-98acbb6d24921ded065fca3b57943ef1ae7fb15f.tar.xz openshift-98acbb6d24921ded065fca3b57943ef1ae7fb15f.zip |
Add nfs-volumes role.
This role is useful to use (physical) disks as persistent volumes in
Kubernetes. It partitions the disks, exports the partitions as NFS shares
and registers the shares as physical volumes at remote Kubernetes
installation.
Diffstat (limited to 'roles/kube_nfs_volumes/tasks/nfs.yml')
-rw-r--r-- | roles/kube_nfs_volumes/tasks/nfs.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/kube_nfs_volumes/tasks/nfs.yml b/roles/kube_nfs_volumes/tasks/nfs.yml new file mode 100644 index 000000000..87cf5f9a4 --- /dev/null +++ b/roles/kube_nfs_volumes/tasks/nfs.yml @@ -0,0 +1,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 |