ansible facts in lowercase

Hi there!

I’m newer in ansible. I have one question and hope you’ll help me with it.

For example I want add deb:

  • name: add webmin deb’s for {{ansible_distribution}} {{ansible_distribution_version}} {{ansible_architecture}}
    apt_repository: repo=‘http://software.virtualmin.com/gpl/debian/ virtualmin-jessie main’ state=present
    when: ansible_distribution == ‘Debian’ and ansible_distribution_release == ‘jessie’

but I don’t want write this for all distro releases.

In the end I want received some thing like this:

  • name: add webmin deb’s for {{ansible_distribution}} {{ansible_distribution_version}} {{ansible_architecture}}
    apt_repository: repo=‘http://software.virtualmin.com/gpl/{{ansible_distribution}}/ virtualmin-{{ansible_distribution_release}} main’ state=present
    when: ansible_distribution == ‘Debian’

That is doesn’t work right, because almost all ansible facts have first letter in uppercase. How I can convert it to lowercase?

Thanks.

use the |lower filter