PS: I'm running facter 3.5.0 with puppet 4.8.1 on CentOS 7

Am Dienstag, 10. Januar 2017 17:44:23 UTC+1 schrieb Denny:
>
> Hi there,
>
> probably a pretty easy to answer question.
>
> I want to try out adding custom facts. My first custom fact should be 
> "lastrebootdate"
>
> My code looks like this:
>
> Facter.add(:lastrebootdate) do
>   setcode do
>     Facter::Util::Resolution.exec("/usr/bin/who -b |awk '{print $3}'")
>   end
> end
>
> Running the command on the system returns "2017-01-30"
>
> Deploying my fact on a puppet node and running the puppet agent returns 
> "Jan".
>
> $ puppet facts |grep lastrebootdate
>     "lastrebootdate": "Jan",
>
> What did I miss?
>
> Thank you,
>
> Denny
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2e65ff6b-38c6-40cc-bc7e-2e0d107e32f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to