It would be nice if resources could declarate a virtual resource that other one depends on. For example, an exec should require the binary but the exec resource should not care where the binary is coming from. It could come from a package then the exec needs to require the package name. Or it could from a remote file or some other definition. It would be nice if the source of the binary could provide a virtual resource that the exec requires. This would give some abstraction.
I see two ways to implement the virtual resources. One is to have a special virtual type which is only used for the virtual provides. This keeps them in a separate namespace which does not interfere with other types.
package { "stow":
provides => "/usr/local/bin/stow"
}
exec { "/usr/local/bin/stow":
require => Virtual["/usr/local/bin/stow"]
}
The other is to have the provides parameter make virtual resources of any type. This allows it to satisfy automatic requires.
package { "stow":
provides => File["/usr/local/bin/stow"]
}
exec { "/usr/local/bin/stow":
requires => File["/usr/local/bin/stow"]
}
In this case, it might be nice to have a virtual parameter for declaring resources as virtual.