Name should be indented under tasks. 

Mike

> On Aug 24, 2019, at 05:25, Manish Kumar <[email protected]> wrote:
> 
> Hi All,
> 
> 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
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/49befd91-f222-4934-aaae-0ca8c46ef653%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/63F7309D-7008-4EA6-A75A-16BC619001E3%40gmail.com.

Reply via email to