Virtual and exported resources
To understand exported resources, it first helps to understand virtual resources. Virtual resources declare a state that could be made available, but will not be enforced until declared with the realize
function. These resources are designed to allow you to prepublish a resource, but only enforce it if other conditions are met. Virtual resources help overcome the single declaration challenge that can emerge in Puppet code if you have multiple manifests that need to generate the same resource—you may need to include more than one of these manifests on a single node. If multiple modules need to manage the same file, consider virtualizing the resource, and making that resource available from multiple modules.
Â
Â
Virtual resources
A common use example of virtual resources is the use of special access administrative users. With a robust security policy, you may not want any single user having administrative access to all systems in an infrastructure. You'd then want...