On Tue, 30 Mar 2021 at 23:42, needabettername <[email protected]> wrote:
> Hi, > > I'd like to edit a file using block in file and delete anything in the > file that isn't in that block, in an idempotent way i,e, not just deleting > the file first. > This would have exactly the same results as using the template module, only harder to do. > I suspect I should be using a template here but partly want to scratch the > itch of whether it's possible, is there a reasonable way? You probably should. Put differently, why would you not use the template module? -- > 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/645c4a3d-69a9-40d0-8c0e-5cd8a1833f0cn%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/645c4a3d-69a9-40d0-8c0e-5cd8a1833f0cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- 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/CAL8fbwPmKZVH3q8SJjwrnN7fNEc7qmvwbT97hyt%2Bry7rkTLnUw%40mail.gmail.com.
