我在puppet中将代理连接到master,我需要使用agent从maseter复制清单文件和其他资源-这可能吗?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.