Last change
on this file since 765 was
728,
checked in by sebas@…, 14 years ago
|
formateo y saco una config del servicio nfsd que no se necesaria
|
File size:
1.3 KB
|
Rev | Line | |
---|
[578] | 1 | class nfs_server { |
---|
| 2 | |
---|
[717] | 3 | package { [ |
---|
| 4 | "portmap", |
---|
| 5 | "nfs-kernel-server" |
---|
| 6 | ]: ensure => installed |
---|
| 7 | } |
---|
[578] | 8 | |
---|
[717] | 9 | service { [ "nfs-kernel-server", "portmap" ]: |
---|
| 10 | ensure => running, |
---|
| 11 | pattern => "nfsd", |
---|
[722] | 12 | require => Package["nfs-kernel-server", "portmap" ], |
---|
[717] | 13 | } |
---|
[578] | 14 | } |
---|
[718] | 15 | |
---|
| 16 | define share_dirs_dev($share_root) { |
---|
| 17 | |
---|
| 18 | file { "${share_root}/$name": |
---|
| 19 | ensure => directory, |
---|
| 20 | owner => "root", |
---|
| 21 | group => "root", |
---|
| 22 | mode => 755, |
---|
| 23 | } |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | # No lo usamos... |
---|
| 27 | define share_mounts_dev($share_root, $volgroup) { |
---|
| 28 | mount { "${share_root}/$name": |
---|
| 29 | ensure => mounted, |
---|
| 30 | device => "${volgroup}/$name", |
---|
| 31 | atboot => true, |
---|
| 32 | fstype => "ext3", |
---|
| 33 | options => "defaults,nosuid", |
---|
| 34 | require => File["${share_root}/$name"], |
---|
| 35 | } |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | define nfs_share_dev ($shares, $volgroup, $share_access = "*.$domain", $share_options = "rw,sync") { |
---|
| 39 | |
---|
| 40 | include nfs_server |
---|
| 41 | |
---|
| 42 | # $shares is an array |
---|
| 43 | share_dirs_dev { $shares: share_root => $name } |
---|
| 44 | # share_mounts { $shares: share_root => $name, volgroup => $volgroup } |
---|
| 45 | |
---|
| 46 | file { "/etc/exports": |
---|
| 47 | owner => "root", |
---|
| 48 | group => "root", |
---|
| 49 | mode => 644, |
---|
| 50 | content => template("nfs_server/etc-exports-dev.erb"), |
---|
| 51 | notify => Service["nfs-kernel-server"], |
---|
| 52 | } |
---|
| 53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.