Class common::assert_lsbdistcodename
In: /home/david/repos/complete/modules/common/manifests/classes/lsb_release.pp
Parent:

This lightweight class only asserts that $lsbdistcodename is set. If the assertion fails, an error is printed on the server

To fail individual resources on a missing lsbdistcodename, require Exec[assert_lsbdistcodename] on the specific resource

This is just one example of how you could avoid evaluation of parts of the manifest, before a bootstrapping class has enabled all the necessary goodies.

[Validate]