On 1/29/20 1:56 PM, Sai Prasha wrote:
> I have .psl file i want to run that file on Ansible nodes ,So when i try to 
> invoke the .psl file using adhoc command : 
> *ansible win1 -m win_command -a "powershell.exe -File 
> C:\Sample\tomeescript.ps1" , *It works fine
> When i try to do the same with win_command module ,its failing
> ---
> - hosts:win1
>   tasks:
>   - name : run psl
>     win_command: powershell.exe -
>       args:
>          chdir: C:\Sample\tomeescript.ps1
> 
> 
> How to run the powershell script using playbook . I am not sure what mistake 
> i did in the playbook

Excuse me, but the name of the script certainly doesn't belong into the chdir 
parameter.

Regards
          Racke
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/543e3dca-4392-4edf-a1db-cb274e7cb544%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/543e3dca-4392-4edf-a1db-cb274e7cb544%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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/a74cfb45-fe3c-5216-a035-4cc16f66bd67%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to