mirror of
https://github.com/saltstack-formulas/nfs-formula.git
synced 2025-04-17 10:10:31 +00:00
Merge pull request #3 from roedie/add-nfs-mount
Add ability to mount nfs shares
This commit is contained in:
commit
d1108cb930
2 changed files with 22 additions and 0 deletions
14
nfs/mount.sls
Normal file
14
nfs/mount.sls
Normal 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 %}
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue