I have a ruby custom fact that when queried with 'facter -p mysite' displays as expected (eg TX), but if I do 'facter -p | grep mysite' it shows up like ["MN"]. It will show up this wrong way when it goes to puppetdb (whose data I view with puppetboard).
This custom fact only behaves this way on one platform, AIX with ruby 2.0.0p353. The built-in facts do not have this same issue. Any ideas on how to fix this? The ruby fact code is something like:
Facter.add("mysite") do
setcode do
case Facter.value(:ipaddress)
when /^10\.1\.91\.|^10\.1\.92\.|^10\.1\.93\./
"TX"
when /^13\.1\.1\.|^13\.1\.2\./
"CA"