我正在开发一个Ansible模块,它生成一个url,从我的内部构件获取(比如get_url)该url的tarball,然后提取它。我想知道是否有一种方法可以在我的模块中包含或扩展get_url Ansible核心模块。我不能在多个步骤中使用它,因为所使用的url是从git哈希生成的,并且需要一个多步骤的搜索。在
如果没有办法,我可能会复制整个get_url模块并在我的模块中使用它,但我希望避免这种情况。在
我想做些类似的事情:
module_json_response = module.get_module('get_url').issue_command('url=http://myartifactory.com/my_artifact.tar.gz dest=/path/to/local/my_artifact.tar.gz');
我对Ansible的理解是它上载正在使用的模块并执行它,包括另一个不受支持或没有文档记录的模块。在
提前谢谢你的帮助。在
引用Michael DeHaan的帖子here:
他后来又提出:
相关问题 更多 >
编程相关推荐