source: trunk/puppet/modules/puppet-nfs_server/manifests/init.pp @ 584

Last change on this file since 584 was 583, checked in by sebas@…, 15 years ago

formateo al estilo puppet

File size: 1009 bytes
Line 
1import "classes/*.pp"
2
3define 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
13define share_mounts($share_root, $volgroup) {
14
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
25define nfs_share ($shares, $volgroup, $share_access = "*.$domain", $share_options = "rw,sync") {
26
27    include nfs_server
28
29    share_dirs { $shares: share_root => $name }     # $shares is an array
30#   share_mounts { $shares: share_root => $name, volgroup => $volgroup }    # $shares is an array
31
32    file { "/etc/exports":
33        owner => "root",
34        group => "root",
35        mode => 644,
36        content => template("nfs_server/etc-exports.erb"),
37        notify => Service["nfs-kernel-server"],
38    }
39}
Note: See TracBrowser for help on using the repository browser.