【发布时间】:2023-03-27 14:20:01
【问题描述】:
使用以下代码复制模板时
- name: "Template source files to temp directory"
template:
src: '{{ item.src }}'
dest: '{{ temp_file_path.path }}/{{ item.path }}'
force: yes
with_filetree: "{{ nginx_path }}/"
delegate_to: 127.0.0.1
when: item.state == 'file'
我被标题中的错误击中了。 I got a possible solution from here 但这里的问题是需要知道所有子目录的名称。当您遇到数十个时,这是不可能的。
解决这个问题的正确方法是什么。类似于 rysnc 使用 - -relative 选项所做的事情
【问题讨论】:
标签: ansible