On 17/05/16 02:37, Corey Osman wrote:
> During a puppet-repl session any code that contains references to
> $server_facts would fail because those special facts did not carry across
> node indirector calls. I ended up reimplementing the assignment of the
> facts as suggested in order to provide these facts in the repl session.
>
> Working example here:
https://www.puppet-repl.com/play?content=vars
>
Glad that worked for you. I think that was the right decision.
> Another annoyance with the node indirector is that it does not populate
> the facts variable as it just merges all facts and variables into the
> parameters variable. Any reason why this is done this way?
>
Poor judgement?
Jokes aside - it is pretty much Bouncy Castle all the way from a request
comes in until it has passed the initial set up and can get down to just
loading manifests and evaluating the catalog. Then the fun begins again
on the path out to the agent.
Specifically, you can ask for a node for different purposes and in
contexts where there are no scopes or variables. You don't know until
you start compiling that you have those things for sure.
Once there were only global variables; no $facts - so all node
parameters were simply set as variables. Once set there were no
difference between those variables that came from the node's facts, and
regular variables set in a manifest.
There is a similar situation with the nodes parameters - IIRC (and as
you say) they are just mixed in to the node's parameters, and then
become both global variables (for backwards compatibility reasons), and
in $facts.
Hope that explains a bit and that it helps you.
Best,
- henrik
> <
http://puppet-on-the-edge.blogspot.se/>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
puppet-dev+...@googlegroups.com
> <mailto:
puppet-dev+...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/puppet-dev/5c68e1f8-e0be-4e84-b5a8-8b6a6aa02b58%40googlegroups.com
> <
https://groups.google.com/d/msgid/puppet-dev/5c68e1f8-e0be-4e84-b5a8-8b6a6aa02b58%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.