remove colons from macaddress in ansible -


i need create file ansbile fact such ansible_default_ipv4.macaddress removing colons mac address

i've tried think of , can't work

you use replace filter replace colons nothing.

for example, write mac address without colons file:

- copy: content="{{ansible_default_ipv4.macaddress|replace(':','')}}" dest=/path/to/file

list of jinja2 builtin filters


Comments