Ansible调试和使用文件树

Ansible调试和使用文件树,ansible,Ansible,无法完成它 我的角色的templates文件夹中有模板。这里有一个简单的任务: - name: Show templates debug: msg: "File: {{ item }}" with_filetree: "/full/path/to/the/existing/folder/with/templates" 仅在输出中: localhost | SUCCESS=>{ “msg”:“所有项目已完成”} 我错过了什么 Ansible

无法完成它

我的角色的templates文件夹中有模板。这里有一个简单的任务:

- name: Show templates
  debug:
    msg: "File: {{ item }}"
  with_filetree: "/full/path/to/the/existing/folder/with/templates"
仅在输出中:

localhost | SUCCESS=>{ “msg”:“所有项目已完成”}

我错过了什么

Ansible infor(如果有帮助):

ansible 2.9.6配置文件= /home/alex/projects/private/ansiblejava生成器/ansible.cfg
配置的模块搜索路径= ['/home/alex/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']ansible python模块位置 =/usr/lib/python3/dist-packages/ansible-executable-location=/usr/bin/ansible-python-version=3.8.5(默认值,2021年1月27日), 15:41:15)[GCC 9.3.0]


听起来像是一个简单的打字错误;此外,我认为没有必要指定完整路径,因为很多路径都使用相对路径。另一个潜在的问题是,filetree查找返回的是dict列表,而不是字符串路径列表。你不是在找
{{item.path}