# Issues with {{ ansible\_hostname }} in task name within a role

**URL:** <https://forum.ansible.com/t/issues-with-ansible-hostname-in-task-name-within-a-role/36656>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [May 24, 2022, 2:01pm UTC](https://forum.ansible.com/t/issues-with-ansible-hostname-in-task-name-within-a-role/36656 "2022-05-24T14:01:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 24, 2022, 2:01pm UTC](https://forum.ansible.com/t/issues-with-ansible-hostname-in-task-name-within-a-role/36656/1 "2022-05-24T14:01:42Z")

</div>

task names need to be the same across all hosts they are run on, so  
'host scoped variables' are not valid for templating in the task  
names.

[https://github.com/ansible/ansible/issues/3103#issuecomment-18835432](https://github.com/ansible/ansible/issues/3103#issuecomment-18835432)
