ansible - ERROR! 'file' is not a valid attribute for a Play -
new playbook test not working. newbie ansible have read throuugh docs , samples etc. wrong ? error! 'file' not valid attribute play
the error appears have been in '/home/ntnet/mresnick/testdel.yml'
: line 10, column 3, may elsewhere in file depending on exact syntax problem.
the offending line appears be:
- 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 } ...
you wrote tasklist , tried run playbook.
when have playbook, can have tasks
key in given play, , list preferred task there.
--- - hosts: hosts tasks: - name: delete sg file: path: "/tmp/{{ item }}" state: absent recurse: no ...
Comments
Post a Comment