gpt4 book ai didi

python - Ansible的模板模块在哪里?

转载 作者:行者123 更新时间:2023-11-28 22:45:43 24 4
gpt4 key购买 nike

模板模块是ansible的核心模块。有一个名为 template.py 的文件:https://github.com/ansible/ansible-modules-core/blob/devel/files/template.py

但是,它只有以下注释和一些文档:

# this is a virtual module that is entirely implemented server side

这是什么意思?哪个服务器? ansible 模块不是具有 main() 入口点和标准参数的通用结构吗。

最佳答案

可能是,他们在该评论中混淆了服务器/客户端。 Ansible 模块在目标主机上运行。模板“模块”虽然似乎是作为本地 Action 插件实现的。这似乎是文件:https://github.com/ansible/ansible/blob/devel/v2/ansible/plugins/action/template.py

没有涉及太多的服务器端操作。模板在本地呈现,然后调用 file 模块将呈现的内容传输到远程主机。

关于python - Ansible的模板模块在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28290543/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com