我正在尝试设置从源到目标的符号链接,但继续点击
致命:[默认]:失败!=> {"changed": false, "failed": true, "msg": "链接时出错: [Errno 2] 没有那个文件或目录", "path": "/Applications/Xcode.app/Contents/Developer /Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/config.h", "state “: “缺席的”}
观察到它显示状态不存在,即使状态作为链接给出。
这是执行的任务:
- name: "Create ruby config.h symlink"
file:
src: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15/ruby/config.h"
dest: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/config.h"
state: link
force: yes
when: xcode_version != "8.0"
Run Code Online (Sandbox Code Playgroud)
文件已存在:
ls -l /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15/ruby/config.h
-rw-r--r-- 2 root wheel 7805 Jan 31 2016 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15/ruby/config.h
Run Code Online (Sandbox Code Playgroud)
注意:根据此处的讨论包含强制是 - Ansbible github 问题
任何帮助表示赞赏!