我试图本地文件夹的 “东西” 复制到 “升级” 文件夹中ansible:复制文件夹recursivly在ansible
- name: Copy the ansible stuff
copy:
src: ./stuff
dest: ./staging
这是SUFF的direcotry结构:
- stuff
- foo
- bar
- file.txt
我得到这个错误:
Destination directory ./staging/stuff/foo/bar does not exist"
该文件夹staging
确实存在!它似乎有复制嵌套文件夹的问题。
为什么?
这并不工作:
- name: Copy the ansible stuff
shell: "cp -r ./stuff ./staging/"
试着给出绝对路径。 – Shasha99