access enc variables in facts

72 views
Skip to first unread message

Cristian Falcas

unread,
Mar 19, 2014, 12:56:47 PM3/19/14
to puppet...@googlegroups.com
Hello,

Is it possible to access the variables sent by ENC in facts?

Foreman is sending in ENC some variables as location and hostgroup.
Can I access those in my facts as variables?

Best regards,
Cristian Falcas

jcbollinger

unread,
Mar 19, 2014, 4:37:03 PM3/19/14
to puppet...@googlegroups.com


On Wednesday, March 19, 2014 11:56:47 AM UTC-5, Cristian Falcas wrote:
Hello,

Is it possible to access the variables sent by ENC in facts?

Foreman is sending in ENC some variables as location and hostgroup.
Can I access those in my facts as variables?


No.  Facts are computed on and by the target node, but the ENC runs on the master.  Furthermore, the ENC runs only after receipt of a catalog request (which includes all the node facts).  An ENC can use node facts, but not the other way around.

It is conceivable that you could record the ENC-generated info on client nodes, in a file somewhere.  In that case, however, you would need to beware of those data becoming stale because they reflect what the ENC yielded on the last run, which might not be the same thing it is about to yield in response to the request being formulated.


John

Cristian Falcas

unread,
Mar 20, 2014, 2:54:40 AM3/20/14
to puppet...@googlegroups.com
Thank you for your answer.

I thought that maybe ENC data is available to facts also, sine puppet
gets the new environment from ENC before starting to run the 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/7a76c746-ce06-439a-a821-169f7fc157fd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages