Tried upgrading facter on that node, but same error ...

On Wednesday, February 11, 2015 at 8:04:18 AM UTC-5, Robert Reilly wrote:
>
> All, I am getting the following problem with facter on 5 of my nodes,
> Fact resolution fact='enviro', resolution='<anonymous>' resolved to an 
> invalid value: Expected (?-mix:xxx(vs|sv).{2,7}\d{1,2}) to be one of 
> [Integer, Float, TrueClass, FalseClass, NilClass, String, Array, Hash], but 
> was Regexp, this seems to only happen to one application running on rhel 
> 5.8 puppet agent 3.5.1 facter 2.0.1
>
> here is my fact
>
> Facter.add(:enviro) do
>     setcode do
>       hostname = Facter.value('hostname')
>         if ( hostname =~  /^.{5}d{1}/i )
>            enviro="dev"
>            enviro
>         elsif (hostname =~  /^.{5}q{1}/i )
>           enviro="qa"
>           enviro
>         elsif (hostname =~  /^.{4,5}u{1}/i )
>           enviro="uat"
>           enviro
>         elsif (hostname =~  /^.{5}p{1}/i )
>           enviro="prod"
>           enviro
>         elsif (hostname =~  /^.{5}xxx/i )
>           enviro="prod"
>           enviro
>         else
>           enviro="unclassified"
>           enviro
>         end
>     end
> end
> ~                           
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a3a9d3fa-858e-4cf1-9b09-cdeab3061202%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to