On 17.02.2017 01:51, sunnz wrote:
can ansible force a path to be a link even when it is a directory with
files? currently i am deleting the directory before making it a link and it
is not idempotent.

You can't force it, you need to delete and create link as you do now.


on the first run it deletes the directory. but it is also deleting and
re-creating the link in every run after that.

Before you delete and create link use the stat module to check if the path is a directory and then do a delete and create the link.

https://docs.ansible.com/ansible/stat_module.html

--
Kai Stian Olstad

--
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/441cd9436c8abcd3920eb556ef5fecc5%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to