Merge pull request #3 from roedie/add-nfs-mount

Add ability to mount nfs shares
This commit is contained in:
Brian Jackson 2015-05-14 10:37:28 -05:00
commit d1108cb930
2 changed files with 22 additions and 0 deletions

14
nfs/mount.sls Normal file
View file

@ -0,0 +1,14 @@
{% from "nfs/map.jinja" import nfs with context %}
include:
- nfs.client
{% for m in salt['pillar.get']('nfs:mount').iteritems() %}
{{ m[1].mountpoint }}:
mount.mounted:
- device: {{ m[1].location }}
- fstype: nfs
- opts: {{ m[1].opts|default('vers=3') }}
- persist: {{ m[1].persist|default('True') }}
- mkmnt: {{ m[1].mkmnt|default('True') }}
{% endfor %}

View file

@ -2,3 +2,11 @@ nfs:
server:
exports:
/srv/homes: "hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)"
mount:
somename:
mountpoint: "/some/path"
location: "hostname:/path"
opts: "vers=3,rsize=65535,wsize=65535"
persist: True
mkmnt: True