Git-Ansible克隆问题
我有一个git回购协议,下面是我的ansible git代码Git-Ansible克隆问题,git,ansible,Git,Ansible,我有一个git回购协议,下面是我的ansible git代码 --- - name: read-write git checkout from repo git: repo: "{{repo_url}}" dest: "{{webapps_dir}}/{{app_name}}" accept_hostkey: yes force: yes remote: "{{repo_remote}}" version: "{{repo_branch}}
---
- name: read-write git checkout from repo
git:
repo: "{{repo_url}}"
dest: "{{webapps_dir}}/{{app_name}}"
accept_hostkey: yes
force: yes
remote: "{{repo_remote}}"
version: "{{repo_branch}}"
register: gitrepo
当我运行上述任务时,它会挂断/无休止地等待。我尝试过调试,发现当我将git主机添加到已知主机(手动进入服务器,然后加载),然后运行这个playbook时,效果很好
虽然我已将accept_hostkey
设置为yes
,但它仍然挂起或无休止地等待
如何使用上述剧本克隆git回购
---
- hosts: all
gather_facts: no
become: yes
vars_prompt:
- name: "gituser"
prompt: "Enter your gitlab ID or username ex: user@XXXX.XXX"
private: no
- name: "gitpassword"
prompt: "Enter your gitlab password"
private: yes
tasks:
- name: Cloning from git
git:
repo: "https://{{ gituser | urlencode }}:{{ gitpassword | urlencode }}@git###.####.###/group/projects.git"
dest: /usr/share/clonefolder
clone: yes
update: yes
force: yes
这可能对你有帮助。接受主机密钥,我正在处理它。我会在完成后更新你
谢谢你试过打开详细模式吗?我试过了。它仍然挂起或无休止地等待。它的O/P是什么?没什么..它只是让…你的机器或网络上有防火墙吗?使用ssl时出现问题?