I have agent connected to master in puppet and I need to copy manifest file and some other resources from maseter using agent - is this possible ?
-
1This sounds like an X-Y problem. If you are using a master / agent setup, then what purpose do you hope will be served by copying *manifest files* from master to agent? – John Bollinger Oct 07 '18 at 02:41
1 Answers
I'm not sure what your use-case is here, but I do not believe this is possible.
In a simple master-agent setup, the agent sends facts to its configured master. In exchange, the master combines those facts, site-specific hiera data, and resource definitions in applicable manifests, compiles a catalog, and sends that catalog to the agent–by design, I don't think agents can access uncompiled manifests. However, where I am more certain is in your ability to see which resources are under puppet's management in the agent's $vardir
more info here. More specifically, inside $vardir/state
. If you'd like to see the compiled catalog, that's available in $vardir/catalog
.
Depending on what you're trying to achieve, maybe it would be enough to see the dependency model on a given agent. You can generate the directed acyclic graph with puppet agent -t --graph
which will populate $vardir/state/graphs
with graphviz dot files. With graphviz installed, you could generate visuals in formats like svg by running dot expanded_relationships.dot -Tsvg -o expanded_relationships.svg
Not quite the full output of the manifests used to compile an agent's catalog, but there's a lot to chew on there.

- 409
- 2
- 5
-
1Of course it's possible. The master can serve arbitrary files to clients via `File` resources. – John Bollinger Oct 07 '18 at 02:38
-
Perhaps I hastily reduced the question to something along the lines of "How do I know which manifest or manifests configure a given node in my deployment?" – burling Oct 07 '18 at 03:39
-
@JohnBollinger made his comment to address that this is completely possible, but, as you see in his comment in the question, why would you want to do this in the first place? – Matthew Schuchard Oct 08 '18 at 12:31