It is, but you have to use a define (or at least how I'm doing it uses a
define), here's an example based on something thing I'm doing:
common.pp:
class my_module::common () {
...
my_module::common::my_symlinks { ['file1', 'file2', 'file3']: }
...
}
common/my_symlinks.pp:
define my_module::common::my_symlinks: {
file { "symlink_${name}":
ensure => link,
path => "/some/path/${name}",
target => "/some/other/path/${name}",
}
}
I wasn't the first to figure that out, I think I remember who I got it
from, but I'm not sure if it's something they came up with or if they
got it from somewhere else. Hope that helps.
--
Joseph Swick <
joseph...@meltwater.com>
Operations Engineer
Meltwater Group