我试图使用ansible拉取github repo,但是它给了我以下错误。
stderr: fatal: destination path '/var/www/server-ip' already exists and is not an empty directory.
msg: fatal: destination path '/var/www/server-ip' already exists and is not an empty directory.
这是我到目前为止所做的。
- name: Pull sources from GitHub
git:
repo: "{{ item.github_repo }}"
version: "{{ item.github_branch }}"
dest: "{{ WEB_ROOT }}/{{ item.server_name }}"
key_file: "/home/username/.ssh/id_rsa"
force: yes
recursive: no
when: item.get('state', 'link') == 'link'
with_items: VIRTUAL_HOSTS
答案 0 :(得分:2)
错误消息已经明白:您要克隆的路径不是空目录。使用其他路径或删除该目录。