【发布时间】:2019-12-17 09:18:29
【问题描述】:
Ansible 2.5 的 Git 模块只返回几个唯一的返回值,而 Ansible 2.8 的 git 模块返回更多唯一的返回值,例如 git_dir_now。我在 Ubuntu 18.04 LTS 上运行 Ansible 2.8,并且使用 gid 模块,我得到的唯一返回值没有 git_dir_now。
Ansible 2.5 Git 模块文档:https://docs.ansible.com/ansible/2.5/modules/git_module.html#id6
Ansible 2.8 Git 模块文档:https://docs.ansible.com/ansible/latest/modules/git_module.html#id6
我已经尝试完全重新安装 Ansible 和 Git,但没有结果。
- name: Clone repository for back-end
git:
repo: "git@gitlab.com:[my_repo]"
dest: /home/ubuntu/myfolder
version: master
accept_hostkey: yes
register: clonedgit
notify:
- set nginx directory be
- debug: msg="{{ clonedgit }}"
我只得到这些值:
我只得到这些返回值,但由于我使用的是 Ansible 2.8,所以我也应该得到其他值,例如 git_dir_now。
【问题讨论】: