4
新的Playbook测试不起作用。新手给予理解,但已阅读文档,样本等。 有什么不对? ERROR! 'file' is not a valid attribute for a Play
错误! '文件'不是Play的有效属性
的误差似乎一直在'/home/NTNET/mresnick/testdel.yml'
:线10,第3列,但也可以 取决于确切的语法问题在文件中在别处。
出错行似乎是:
- file: "path=/tmp/{{ item }} state=absent recurse=no"
^here
---
- name: test playbooktestdel
- hosts: temp3
tasks:
- name: "delete old files Aveksa"
- file: path=/tmp/{{ item }} state=absent recurse=no
with_items:
- { Aveksa.tar }
- { sudo_commands }
- { baz }
...
修正阳明的副本:--- - 名称:测试playbooktestdel - 主机:TEMP3 任务: - 名称: “删除旧文件Aveksa” - 文件:路径=/tmp目录/ {{项目}} state = absent recurse = no with_items: - {Aveksa.tar} - {sudo_commands} - {baz} ... –