简体   繁体   English

如何使用代理从母带下载人事清单文件?

[英]How to download puppet manifest file from master using agent?

我在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 . 但是,我更确定的是您是否可以在代理的$vardir 更多信息中查看 $vardir管理的资源。 More specifically, inside $vardir/state . 更具体地说,在$vardir/state内部。 If you'd like to see the compiled catalog, that's available in $vardir/catalog . 如果您想查看编译的目录,可以在$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 . 您可以使用puppet agent -t --graph生成有向无环图,该$vardir/state/graphsgraphviz 点文件填充$vardir/state/graphs With graphviz installed, you could generate visuals in formats like svg by running dot expanded_relationships.dot -Tsvg -o expanded_relationships.svg 安装了graphviz后,您可以通过运行dot expanded_relationships.dot -Tsvg -o expanded_relationships.svg来生成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. 用于编译座席目录的清单清单的输出并不完全,但是还有很多需要注意的地方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM