I'm having a difficult time with a dependency issue. Basically, I want to be able to call a defined type, but it's not working out so far. I have my manifests setup like this:
init.pp:
class foo {
....
}
bar.pp:
class foo::bar {
include foo
package{ "test":
ensure => running,
notify => Foo::Myservice['test'],
}
}
services.pp
define foo::myservice($service = $title) {
service { "$service":
enable => true,
hasstatus => true,
hasrestart => true,
}
}
So, you can see my goal is to have a single defined service function that takes a service "name" as a parameter and then I can notify it with different services names.
But, I keep getting this:
Error: Failed to apply catalog: Could not find dependent Foo::Myservice['test']
Thanks!
JC