Line | |
---|
1 | import "classes/*.pp" |
---|
2 | |
---|
3 | define share_dirs($share_root) { |
---|
4 | |
---|
5 | file { "${share_root}/$name": |
---|
6 | ensure => directory, |
---|
7 | owner => "root", |
---|
8 | group => "root", |
---|
9 | mode => 755, |
---|
10 | } |
---|
11 | } |
---|
12 | |
---|
13 | # No lo usamos... |
---|
14 | define share_mounts($share_root, $volgroup) { |
---|
15 | mount { "${share_root}/$name": |
---|
16 | ensure => mounted, |
---|
17 | device => "${volgroup}/$name", |
---|
18 | atboot => true, |
---|
19 | fstype => "ext3", |
---|
20 | options => "defaults,nosuid", |
---|
21 | require => File["${share_root}/$name"], |
---|
22 | } |
---|
23 | } |
---|
24 | |
---|
25 | define nfs_share ($shares, $volgroup, $share_access = "*.$domain", $share_options = "rw,sync") { |
---|
26 | |
---|
27 | include nfs_server |
---|
28 | |
---|
29 | # $shares is an array |
---|
30 | share_dirs { $shares: share_root => $name } |
---|
31 | # share_mounts { $shares: share_root => $name, volgroup => $volgroup } |
---|
32 | |
---|
33 | file { "/etc/exports": |
---|
34 | owner => "root", |
---|
35 | group => "root", |
---|
36 | mode => 644, |
---|
37 | content => template("nfs_server/etc-exports.erb"), |
---|
38 | notify => Service["nfs-kernel-server"], |
---|
39 | } |
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.