Normally, yes, but in this case it needs a class list locally to populate 
the fact, and it doesn't have that until after a run.
Facts get sent to the master, where classes are allocated and a catalog 
compiled, then the catalog sent back to the client.  Without the initial 
catalog, the client has no knowledge of the classes, and can't set the fact 
accordingly.

If I could set the fact on the server I'd be away, but I haven't yet found 
a way to get that working.


This is proving harder than initially thought.  I think I might have to 
shelve it.   :-(



On Friday, January 29, 2016 at 3:53:54 PM UTC, R.I. Pienaar wrote:
>
>
>
> ----- Original Message ----- 
> > From: "Gareth Humphries" <gareth.hu...@gmail.com <javascript:>> 
> > To: "puppet-users" <puppet...@googlegroups.com <javascript:>> 
> > Sent: Friday, January 29, 2016 4:50:50 PM 
> > Subject: [Puppet Users] Re: Making a "role" fact work 
>
> > ENC is the end game, but we have legacy hosts this has to work on. 
>  Right 
> > now I have site.pp which has a list of unpleasant regexes and an 
> 'include 
> > role::<whatever>' stanza for each.  I could put '$role=<something> ; 
> > include role::$role' in each of them instead, but I would have to do 
> that 
> > in every single case, which I'm trying to avoid. 
> > 
> > External facts work, but not on the first run.  Because facts get loaded 
> > before catalog compilation, the host doesn't know what to set that fact 
> to 
> > until it already has a catalog -  a little bit chicken-and-egg. 
> > If i'm relying on the role fact to get data out of hiera, I need that 
> fact 
> > available first run or compilation will fail. 
>
> facts are available from first run. 
>
> Plugin sync happens first and then it requests a catalog including the 
> newly 
> received facts. 
>

-- 
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/da4b59b2-d5a2-4deb-9351-9541e82abe7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to