Convert value of an Ansible variable from lower case to upper case

I am working on a playbook to join linux systems to Active Directory. I can't seem to find a way to convert the value of ansible_hostname to uppercase. One of the commands I need to run requires the hostname to be supplied in uppercase.


As Hector Valverde mentionned, it seems to be

{{ ansible_hostname|upper }}

...rather than "uppercase"


In my case to convert the value of a variable to uppercase pipe the variable to upper like so:

{{ ansible_hostname|upper }}