Ansible includes a |dirname filter that will do this for you. On Wednesday, August 6, 2014, Steven Ringo <[email protected]> wrote:
> Hi, > > I wish to pass in a parameter for a file, e.g: > * /var/log/atlas/service.log* > > The directory at */var/log/atlas/* must also be created before the > application writes to this file. > > Is there a way to get the directory from the path, perhaps with a jinja2 > filter? Or if anyone knows of a filter than can do this, that would be > awesome. > > Thanks, > > Steve > > > -- > 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:_e(%7B%7D,'cvml','ansible-project%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/281a861d-0aa1-493c-b6ee-94bab0dd35f6%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/281a861d-0aa1-493c-b6ee-94bab0dd35f6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Matt Martz [email protected] http://sivel.net/ -- 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/CAD8N0v_B%2Bu%2BQ2HxrB8c61pZU5L4VzFKAdD-j0yeoWLH-19RfPA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
