如何在microsoft windows下使用ansible克隆git存储库 [英] How to clone git repository using ansible under microsoft windows

查看:29
本文介绍了如何在microsoft windows下使用ansible克隆git存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ansible 2.1,centos7下控制主机,windows 10作为客户端的数量.

Ansible 2.1, control host under centos7, number of windows 10 as clients.

我需要在远程端克隆 git 存储库,但不知道如何执行此操作:

I need to clone git reposritory on remote side, but no idea how to do this:

我尝试过类似的方法:

- name: clone repositories
  git:
   repo: "{{ item.repo }}"
   dest: "C:\openserver\domains\{{ domain_name }}\{{ item.value.path }}"
   version: "{{ item.version | default('HEAD') }}"
  with_items: "{{ repositories }}"

推荐答案

我从 @tivrobo 中找到了要使用的 win_git 模块:

I have found win_git module to use from @tivrobo:

https://github.com/tivrobo/ansible-win_git

这篇关于如何在microsoft windows下使用ansible克隆git存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆