Is there any solution to know why ansible is throwing below error even after correct syntax ? It has become very difficult to find as there is no clue even after referring ansible document , everything seems to be fine .
Parsed /home/manish/mk/ansible/win/inventory.yml inventory source with ini plugin
ERROR! 'win_file_version' is not a valid attribute for a Play
The error appears to be in '/home/manish/mk/ansible/win/win_file_version.yml': line 7, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: testing
^ here
Playbook:
---
- hosts: all
gather_facts: no
tasks:
- name: testing
win_file_version:
path: C:\Users\Administrator\Downloads\npp.7.7.1.Installer.exe
register: exe_file_version
- debug:
msg: '{{ exe_file_version }}'
Thanks,
Manish