While in training this week, a coworker was trying to figure out how to confine a fact using a another fact when using facter.
This is quite easy using confine
in the Facter.add
block however when you add dynamic facts in the mix , that block is always executed after you wanted it confined.
For instance if you have some yum
based fact that dynamically generates many more facts and wanted to confine it only to RedHat, you can simply do the following: