Ansible Git Module

--- # Git Module Example
- hosts: apacheserver
  user: ansible
  sudo: yes
  connection: ssh
  gather_facts: no
  tasks:
  - name: Checking out a git repo on the remote server
    git: repo=git://woody-xu3:/home/ansible/testrepo dest=/home/ansible/gitrepo-2/
    register: vinfo
  - debug: var=vinfo

Not work!!!

# Example checkout a github repo and use refspec to fetch all pull requests
- git: repo=https://github.com/ansible/ansible-examples.git dest=/src/ansible-examples

It's working!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,868评论 0 23
  • How to Do What You Love Paul Graham/译:王亚辉 如何做自己喜欢做的事(其实文章...
    王亚辉阅读 3,200评论 0 13
  • 教育 2013年,宁洱哈尼族彝族自治县有各级各类学校63所,其中:普通中学11所,在校学生7837人;其中高中生2...
    蔡蔡Tacy阅读 262评论 0 0
  • 大家好,我是日记星球216号星宝宝丫丫,这是我在日记星球的第56篇日记!如果你想挑战自己的耐力,快来成为我们的同学...
    丫丫向大大阅读 234评论 0 0
  • 三年前,我和老公临时决定去武功山看高山草甸。 哈哈,时间好快,老公那时还是男票,现在已经是娃儿他爸。认真想想,我很...
    阿狸向前阅读 320评论 1 3