Convert value of an Ansible variable from lower case to upper case
Solution 1:
As Hector Valverde mentionned, it seems to be
{{ ansible_hostname|upper }}
...rather than "uppercase"
Solution 2:
In my case to convert the value of a variable to uppercase pipe the variable to upper like so:
{{ ansible_hostname|upper }}