Basename of {file} in ansible_managed

Friends,

{file} in ansible_managed uses gets replaced with the filename and its full path. Is there another variable to get the filename only, omitting the full path?

Thanks!
Stephan

There’s a rather limited set of variables sent to what is provided to the ansible_managed as it’s not evaluated by the template engine, but some basic string.format operations.

Jinja2 does have a basename filter, though this line is not evaluated by Jinja2, so changing this would require the code to itself change, and also some code to keep compatibility.

As such, this is unlikely to change at this time.