String manipulation ansible.

955 views
Skip to first unread message

Antoine Voiry

unread,
Mar 20, 2015, 7:22:04 PM3/20/15
to ansible...@googlegroups.com
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

Brian Coca

unread,
Mar 20, 2015, 7:26:00 PM3/20/15
to ansible...@googlegroups.com
try {{attribute_name|lower}


--
Brian Coca
Reply all
Reply to author
Forward
0 new messages