Re: [Puppet Users] custom fact issue

2012-03-16 Thread Krzysztof Wilczynski
Hi, There is also no need to call "date" from within the shell saving on unnecessary fork, as Ruby can provide UTC time for you. More concise version: https://gist.github.com/2051811 KW On Friday, 16 March 2012 16:51:02 UTC, Jemmorey wrote: > > So far so good. In test environment it actually

Re: [Puppet Users] custom fact issue

2012-03-16 Thread Jemmorey
So far so good. In test environment it actually reports when I run it. Thank you very much Guy. I'll let you know how it goes in the environments which actually use noop. Appreciate the help :) Jordan On Friday, March 16, 2012 12:26:23 PM UTC-4, Guy Matz wrote: > > Hi! Does the following

Re: [Puppet Users] custom fact issue

2012-03-16 Thread Guy Matz
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"