Ansible 访问自定义模块中预定义的可扩展模块
有人可以发布一个关于如何在自定义模块中使用预定义ansible模块示例-“git模块”的示例吗 我试图将以下任务转换为单个自定义模块-Ansible 访问自定义模块中预定义的可扩展模块,ansible,Ansible,有人可以发布一个关于如何在自定义模块中使用预定义ansible模块示例-“git模块”的示例吗 我试图将以下任务转换为单个自定义模块- - name : clone repo on remote hosts git : repo : {{ git_repo_src }} dest : {{ git_repo_dest }} - name : fetch template from single remote host run_once : true fet
- name : clone repo on remote hosts
git :
repo : {{ git_repo_src }}
dest : {{ git_repo_dest }}
- name : fetch template from single remote host
run_once : true
fetch :
src : {{ template_path }}/{{ template_file }}
dest : /tmp/{{ templalte_file }}
flat : yes
fail_on_missing : yes
- name : template remote hosts
template :
src : /tmp/{{ template_file }}
dest : {{ templated_file_dest }}
owner : {{ templated_file_owner }}
group : {{ templated_file_group }}
mode : {{ templated_file_mode }}
将以下任务合并到单个自定义模块中
所以,我听到的是,您希望协调几个内置的ansible操作,有时是有条件的,或者是循环的,可能是一些变量和通知,甚至可能是将所有这些存储在一个单独的git repo中的能力,以便于包含/合成
那没有发布任务。实际上没有!!我想构建一个自定义模块,从远程git repo获取模板。因此,我想在我的action pluginAgree中使用ansible预定义的git模块,这不是答案