文件夹已存在,但它不是 Ansible Subversion 检出中的 Subversion 存储库错误
Folder already exist, but it is not a Subversion repository error in Ansible Subversion checkout
我正在尝试使用 Ansible 颠覆模块从我的存储库服务器检出 SVN 存储库。我已经在我的服务器中配置了一个 svn 存储库。我正在尝试使用 Ansible 剧本和颠覆模块将其签入我的 Ec2 机器。但是当我是 运行 剧本时,我得到的错误是:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "ERROR: ././ folder already exists, but its not a subversion repository."}
我的 Ansible 角色任务包含以下内容:
- name: SVN checkout
subversion:
repo: <my-ip>/svn/test
checkout: yes
update: yes
dest: ././
我收到如下错误,
更新观察
当我仅使用“export: yes”选项导出时,它工作正常。问题仅针对结帐操作。
我的困惑是,我使用上面的 YML 结账有什么问题吗?为什么只显示这些类型的错误?由于导出也正常工作。
为了检出到非空文件夹,您应该使用 in_place
,此选项是在 2.6 版本中添加的,特别是 this PR.
尝试将 in_place = yes
添加到您的选项列表中。
- name: SVN checkout
subversion:
repo: <my-ip>/svn/test
checkout: yes
update: yes
in_place: yes
dest: ././
仔细检查是否有任何内容被覆盖,这是在幕后 svn checkout --force
。
in_place default value: no
If the directory exists, then the working copy will be checked-out
over-the-top using svn checkout --force; if force is specified then
existing files with different content are reverted
我正在尝试使用 Ansible 颠覆模块从我的存储库服务器检出 SVN 存储库。我已经在我的服务器中配置了一个 svn 存储库。我正在尝试使用 Ansible 剧本和颠覆模块将其签入我的 Ec2 机器。但是当我是 运行 剧本时,我得到的错误是:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "ERROR: ././ folder already exists, but its not a subversion repository."}
我的 Ansible 角色任务包含以下内容:
- name: SVN checkout
subversion:
repo: <my-ip>/svn/test
checkout: yes
update: yes
dest: ././
我收到如下错误,
更新观察
当我仅使用“export: yes”选项导出时,它工作正常。问题仅针对结帐操作。
我的困惑是,我使用上面的 YML 结账有什么问题吗?为什么只显示这些类型的错误?由于导出也正常工作。
为了检出到非空文件夹,您应该使用 in_place
,此选项是在 2.6 版本中添加的,特别是 this PR.
尝试将 in_place = yes
添加到您的选项列表中。
- name: SVN checkout
subversion:
repo: <my-ip>/svn/test
checkout: yes
update: yes
in_place: yes
dest: ././
仔细检查是否有任何内容被覆盖,这是在幕后 svn checkout --force
。
in_place default value: no
If the directory exists, then the working copy will be checked-out over-the-top using svn checkout --force; if force is specified then existing files with different content are reverted