When your Puppet setup is getting larger, you must come across the duplicated resource declaration error.
We are not allowed to declare the same resource more than one time!
So Puppet introduces the virtual resource to solve this problem. A virtual resource will not be sent to the Puppet client until it is realized. Now, we could specify a virtual resource and mark it non-virtual as many times as you want in a configuration.
For example: I have a my_packages class which contains all the some package resources. It only contains virtual resources so any other class include this would do nothing.
Continue reading Puppet – Using virtual resources to prevent duplicated resource declaration