Ansible 不拉 git 回购
Ansible not pulling git repo
我正在尝试使用 ansible 提取 github 回购协议,但它给了我以下错误。
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
错误信息已经说得很明白了:你克隆的路径不是空目录。使用其他路径或删除该目录。
我正在尝试使用 ansible 提取 github 回购协议,但它给了我以下错误。
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
错误信息已经说得很明白了:你克隆的路径不是空目录。使用其他路径或删除该目录。