I am trying to use the same hiera hash to create the mount point and
mounts. (Would be nice if mount could create the mount points using 3.1.1)
My plan was to define create_mount_points and use create_resources with the
same hash, and just though away what I dont use.... maybe there is a
better means?
Here is the mount class:
class fstab::mounts ( $config = undef ) {
$defaults = {
atboot => true,
ensure => 'mounted',
}
$hiera_config = hiera_hash('fstab::mounts', undef)
if $hiera_config {
create_resources(fstab::create_mount_points, $hiera_config )
create_resources(mount, $hiera_config, $defaults)
}
}
the define
define fstab::create_mount_points ( $config = undef ) {
file{ $name:
ensure => directory,
owner => 'root',
group => 'root',
}
}
and the hiera yaml
fstab::mounts:
'/mnt/test':
ensure: 'mounted'
device: '/dev/sdi'
atboot: 'true'
fstype: 'ext4'
options: 'defaults'
How do I just pass the name/title from the hash? I get Error 400 on
SERVER: Invalid parameter ensure. I look like create_resources oversites
all the setting for create_mount_points?
Any thoughts? Or a better means?
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.