For example, an exec should depend on the binary being present. But
the exec resource should not care where the binary is coming from.
For example, we have a stow command:
define stow($creates, $path = "/usr/local/bin") {
exec { "stow-$name":
command => "$path/stow -v $name",
cwd => "/usr/local/stow",
creates => $creates,
}
}
I would like to say that the exec requires stow.
require => File["$path/stow"]
However, the binary is coming from a package.
require => Package["stow"]
But the stow definition shouldn''t care where the binary comes from,
just that it exists and any resources necessary to create it are done
first. It would be nice if the stow package could say it provides the
binary.
package { "stow":
provide => File["/usr/local/bin/stow"]
}
It would even be acceptable if provides only worked on a virtual type
that only existed for provides.
- Ian