jam*_*981 3 ansible
我正在开发一个用于编译源的 Ansible 模块,例如
- source_compile: archive: /var/cache/sources/nginx.tar.gz configure: prefix: /usr
我可能会
所以我想使用ansible核心模块get_url和unarchive和shell,但没有找到如何。
Kon*_*rov 5
您只能从操作插件执行其他模块,而不能从模块本身执行。 这是通过_execute_module辅助函数完成的。例如,请参阅模板操作。
_execute_module
此外,您可能有兴趣使用其他辅助函数,例如fetch_url检索远程数据和_low_level_execute_command运行 shell 命令,而不是调用其他模块。
fetch_url
_low_level_execute_command
我建议检查 Ansible 核心模块/操作源代码以了解其工作原理。
归档时间:
9 年,11 月 前
查看次数:
2738 次
最近记录:
9 年,2 月 前