You are using Ansible 2.9 and the ansible.windows collections does not work 
with this Ansible version (requires 2.10). This is one of the reasons why 
the minimum version for that collection is 2.10.

Thanks

Jordan

On Friday, March 19, 2021 at 1:12:31 AM UTC+10 jayantya...@gmail.com wrote:

>  Hi Everyone,
>
> I'm getting this error, I've added the playbook below. Please let me know 
> how to fix this error
>
> jayantyadav@DESKTOP-40L7UNL:/etc/ansible$ ansible-playbook editfile.yml
> ERROR! this task 'ansible.windows.win_command' has extra params, which is 
> only allowed in the following modules: raw, include_role, add_host, 
> import_role, include, group_by, win_command, command, win_shell, meta, 
> shell, script, set_fact, include_tasks, include_vars, import_tasks
>
> The error appears to be in '/etc/ansible/editfile.yml': line 6, column 5, 
> but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>   tasks:
>   - name: Rename build properties file
>     ^ here
>
>
>
> *Here's the playbook*
>  1 ---
>   2 - name: update file
>   3   hosts: app
>   4
>   5   tasks:
>   6   - name: Rename build properties file
>   7     ansible.windows.win_command: powershell.exe
>   8     args:
>   9       stdin: Rename-Item -Path 
> C:\Ansible_Test_Folder\Ansible_Test_File1.txt-NewName.txt
>  10 ...
> ~          
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a9dd4d40-7b19-485e-8afd-f8aae040f64an%40googlegroups.com.

Reply via email to