Bingo!

Really appreciate your valuable response. It's work for me.

Thanks,
Rahul

On Friday, December 6, 2019 at 1:22:13 PM UTC+5:30, Stefan Hornburg (Racke) 
wrote:
>
> On 12/6/19 8:48 AM, Rahul Rawat wrote: 
> > Hi, 
> > 
> > I have to parse variable in static PowerShell script which will copy 
> through win_copy module on target machine. 
> > Means when file copy on target machine after running playbook it should 
> have values of those variable. 
> > 
> > I've keep variable in default like: 
> > user_name: ****** 
> > password: ****** 
> > 
> > and tasks/main.yml file: 
> > 
> > --- 
> > # tasks file for trust 
> > - name: Copy a single file, but keep a backup 
> >   win_copy: 
> >     src: templates/fixtrust.ps1.j2 
> >     dest: C:\fixtrust.ps1 
> >     backup: yes 
> > 
> > - name: Run powershell script to resolve break trust 
> >   win_shell: C:\fixtrust.ps1 
> > 
> > 
> > and powershell file kept in files or template directory: 
> > 
> > netdom resetpwd /Server:devqacloud.com /UserD:{{ user_name }} 
> /PasswordD:{{ password }} 
> > nltest /sc_verify:devqacloud.com 
> > gpupdate /force 
> > 
> > 
> > Please help me out if you have worked related to this, 
>
> Hello Rahul, 
>
> Why don't you use the template module instead of win_copy? 
>
> Regards 
>        Racke 
>
> > 
> > regards, 
> > Rahul  
> > 
> > -- 
> > 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] <javascript:> <mailto:
> [email protected] <javascript:>>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/5d41658f-05d9-4897-bd92-e7b9c9cfe038%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/ansible-project/5d41658f-05d9-4897-bd92-e7b9c9cfe038%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/232579ee-e55e-4829-861d-83c6279764b6%40googlegroups.com.

Reply via email to