多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[git模块][1] 此模块用于checkout远程git仓库中的文件 应先在git仓库添加密钥认证,在进行克隆。 ``` --- - name: module git test hosts: s.hi.com vars: repo_url: git@git.coding.net:echohiyang/ansiblebook.git dest_path: /tmp/repo tasks: - name: checkout repository on the host git: repo={{ repo_url }} dest={{ dest_path }} accept_hostkey=yes ``` >[danger]注意:dest所指定的那级目录应不存在,否则会报错 [1]:http://docs.ansible.com/ansible/latest/git_module.html