custom fact issue
i inherited some legacy code that uses the list of applied classes on a node to assign a "node type." this parses /var/lib/puppet/classes.txt as a fact ("puppet_classes").
the reworked node type fact looks roughly like this, which includes an example node type and classes:
the original is way longer and prone to failure.
the parse_classes method returns correct results when outside the Facter.add blocks but nothing inside. what am i missing?