Try with command or shell module with cp -f. On Friday, November 2, 2018 at 2:21:33 PM UTC+5:30, Keshipeddy Anusha wrote: > > No change Mohan > It is not replacing the file > > On Fri, Nov 2, 2018, 2:20 PM Mohan L <[email protected] <javascript:> > wrote: > >> copy module with force yes automatically replace it. Otherwise you may >> need to delete it before copy task. >> >> On Thursday, November 1, 2018 at 8:11:53 PM UTC+5:30, Keshipeddy Anusha >> wrote: >>> >>> Okay got it. Is there any specific module that we can use to replace a >>> complete file in remote server? >>> >>> Thank you for your help. >>> >>> Thanks, >>> Anusha >>> >>> On Thu, Nov 1, 2018, 8:07 PM Mohan L <[email protected] wrote: >>> >>>> >>>> What is happening when you try to use force: yes? >>>> >>>> *force* >>>> bool >>>> >>>> *Choices:* >>>> - no >>>> - *yes* ← >>>> >>>> the default is yes, which will replace the remote file when contents >>>> are different than the source. If no, the file will only be >>>> transferred if the destination does not exist. >>>> >>>> aliases: thirsty >>>> >>>> On Thursday, November 1, 2018 at 9:48:27 AM UTC+5:30, Keshipeddy Anusha >>>> wrote: >>>>> >>>>> How to replace the existing file on remote server ....should we use >>>>> any specific module for that? I tried using force=yes but it didn't work >>>>> for me. >>>>> >>>>> On Tue, Oct 30, 2018, 5:30 PM <[email protected] wrote: >>>>> >>>>>> Thank you Mohan that worked for me >>>>>> >>>>>> -- >>>>>> 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 post to this group, send email to [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/ansible-project/4950ba71-0f0d-4630-8c1c-475fc93f8fc2%40googlegroups.com >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> -- >>>> 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 post to this group, send email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/ansible-project/01ef6833-b052-43ff-881e-70ad14e427e6%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/ansible-project/01ef6833-b052-43ff-881e-70ad14e427e6%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> 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:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/b6898b5a-9204-4c27-bded-506194a56cfd%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/b6898b5a-9204-4c27-bded-506194a56cfd%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >
-- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f963a9e3-56c8-4ebb-a3c7-8b7cbe5b812d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
