I don't know which is the best solution, what I do is:
if $::factX != undef {
....
}
Regards
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3377a441-bfd3-4b29-b700-611ebdb57f76%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Facts get sent at the start to the Puppet master so bringing an interface online during a Puppet run won't make it available as a Fact during that run, only on the next run as then the Facts are collected again. Your best bet is to make it conditional, check for the existence of the Fact and only if it is set do something.