Frederik Wagner wrote:
I would think that something like the following would do the job, but
it doesn't.
in some class:
@file{"/mountpoint": ensure => directory }
@mount{"/mountpoint":
...,
require => File["/mountpoint"]
}
in some other class:
Mount<| title == "/mountpoint" |>
What am I missing? Or is this not possible at all?
It's not possible to do it that exact way. But, you can use a define:
define foomount($device, $fstype, ...)
{
File <| name == $name |>
mount { $name: ..., require => File[$name]; }
}
@file { "/mountpoint": ensure => directory; }
@foomount { "/mountpoint": ...; }
Foomount <| title == "/mountpoint" |>
Unless you really want to declare the virtual file resource in some
other place than where you define foomount, it probably makes more
sense to inline that in foomount, though:
define foomount($device, $fstype, ...)
{
file { $name: ensure => directory; }
mount { $name: ..., require => File[$name]; }
}
Hope this helps.
/Bellman
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.