--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Ubou1ggrLusJ.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi! Does the following do what you might expect?
fact_name = 'noop'
Facter.add(fact_name) do
setcode do
utc_hour = %x{/bin/date -u +"%H"}.chomp.to_i
environment = Facter.value(:environment)
#puts "env = #{environment}"
if environment.match("test|dev|qa")
result = "false"
else
if utc_hour.between?(1,10)
result = "false"
else
result = "true"
end
end
#puts "result #{result}"
result
end
end
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.