Filter puppet pluginsync
Solution 1:
There is no way to filter plugins.
But as you say in your comment, you need to write the facts/types to handle the OS they're running on. For types and providers you exit early.
For facts you can use confine.
Solution 2:
Puppet itself does not support filtering the lists of plugins to be synced.
However, you can patch puppet to support this using the pluginsync_filter
patch from CERN.
Afterwards you can whitelist modules like this via Hiera:
pluginsync_filter_enable: true
pluginsync_filter:
- whitelisted
- module
- names
Note: AFAIK this patch is probably not publically supported, so you'll be on your own if you decide to use it.