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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -