String manipulation ansible.

Hello,
I would like to change a file based on the lower case of a variable.
How do I do that?
I tried

  • name: replace string in file

replace: dest=‘{{base_dir}}/{{lower(attribute_name)}}.file.properties’ regexp=‘CHANGEME’ replace=‘{{ ansible_fqdn }}’ backup=yes

I thought I would be able to do it as in Jinja but that doesn’t work.
Any idea?
Antoine

try {{attribute_name|lower}