force=yes is available for such things. There have been some recent refinements depending on what version you are using, but you didn't specify.
If force=yes doesn't handle this for you in the latest 1.5 development branch please file a ticket, and also reference the message about "None" as that's suboptimal. Thanks. On Mon, Dec 30, 2013 at 7:48 PM, David Reagan <[email protected]> wrote: > With some help from IRC, I ended up checking for the paths with the stat > module. Sadly, the only way that worked was to make 2 tasks per path. Glad > I only had a few to check... > > > On Monday, December 30, 2013 3:47:08 PM UTC-8, David Reagan wrote: >> >> I have a task that creates a directory. On one server, that directory >> already exists, but is a symlink. So ansible says the task failed when it >> runs. The message: "msg: refusing to convert between link and directory for >> None". Is there a way to tell ansible that a symlink is ok for that task? >> >> Or check if a directory or symlink exists before running the task? >> > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Michael DeHaan <[email protected]> CTO, AnsibleWorks, Inc. http://www.ansibleworks.com/ -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
