I've been playing around with this code and have encountered several
errors. As noted below, there is going to be an issue with /home;
however, I thought I could get around that by declaring that /first/, which
won't work -- as it complains about duplicate declarations of /home.
class nfs_mounts_prod {
define nfs_mounts {
$server = "ourserver.com"
$options =
"tcp,rw,hard,intr,vers=3,tcp,rsize=32768,wsize=32768,bg"
# These needed to be defined here, it would not work
outside of the class definition
$prod_mounts = [
'201301',
'201301pod',
]
file { "/home":
ensure => directory,
owner => "root",
group => "root",
mode => "0755",
}
file { "/home/${name}":
ensure => directory,
owner => "16326",
group => "90",
mode => "0755",
require => File["/home"],
} # file
mount { "/home/${name}":
device => "${server}:/export/prod/${name}",
atboot => yes,
fstype => nfs,
options => "${options}",
name => "/home/${name}",
ensure => mounted,
remounts => true,
pass => "0",
require => File["/home/${name}"],
} # mount
} # nfs_mounts
nfs_mounts { $prod_mounts: }
} # class nfs_mounts_prod
Can you tell me what's wrong -- or if this is even going to work :-)
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.