conditionalize exported resources

In environments without PuppetDB there are no exported resources.

This is completely untested, but should work... :bomb: