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

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

formateo

File size: 1001 bytes
RevLine 
[578]1import "classes/*.pp"
2
3define share_dirs($share_root) {
4
[583]5    file { "${share_root}/$name":
6        ensure => directory,
7        owner  => "root",
8        group  => "root",
9        mode   => 755,
10    }
[578]11}
12
[585]13# No lo usamos...
[578]14define share_mounts($share_root, $volgroup) {
[583]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    }
[578]23}
24
25define nfs_share ($shares, $volgroup, $share_access = "*.$domain", $share_options = "rw,sync") {
26
[583]27    include nfs_server
[578]28
[585]29    # $shares is an array
30    share_dirs { $shares: share_root => $name }
31#   share_mounts { $shares: share_root => $name, volgroup => $volgroup }
[578]32
[583]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    }
[578]40}
Note: See TracBrowser for help on using the repository browser.