Hi John, Is synchronize an option?
https://docs.ansible.com/ansible/2.9/modules/synchronize_module.html#synchronize-module - Rilindo > On Nov 22, 2021, at 1:59 PM, John Petro <[email protected]> wrote: > > I am working on a role for work, and it needs to keep the source directory ( > that lives on the ansible controlnode ), and the destination ( lives on teh > remote ) in sync. I know that the copy module can keep the changes/additions > in sync. I am not so much worried about that part. Where I am getting > stuck, is how to handle if we delete a file at the source, and want that > delete carried forward to the remote. > > Is there a good way to do that, other than stat the files, loop through the > variable, and delete anything that doesn't exist? > > Any advice you have here would be much appreciated. > > --John > > -- > 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/CAPAjob8UvQuOSCGMUqiO--vM6dVAB27aa_-RMmYegbCtcCninw%40mail.gmail.com > > <https://groups.google.com/d/msgid/ansible-project/CAPAjob8UvQuOSCGMUqiO--vM6dVAB27aa_-RMmYegbCtcCninw%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- This email and its attachments are confidential and may be privileged. Any unauthorized use or disclosure is prohibited. If you receive this email in error, please notify the sender and permanently delete the original without forwarding, making any copies or disclosing its contents. NextCapital is a brand name representing NextCapital Group, Inc. and its subsidiaries, NextCapital Software, Inc. and NextCapital Advisers, Inc. -- 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/1DF1D585-4290-4523-85F6-0CE71B1DD826%40nextcapital.com.
