# Concatenate registered variable , variables in vara and strings

**URL:** <https://forum.ansible.com/t/concatenate-registered-variable-variables-in-vara-and-strings/29821>\
**Category:** Ansible Project\
**Created:** [March 4, 2019, 5:51pm UTC](https://forum.ansible.com/t/concatenate-registered-variable-variables-in-vara-and-strings/29821 "2019-03-04T17:51:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pnagaraj7656](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pnagaraj7656](https://forum.ansible.com/u/pnagaraj7656)\
**Post date:** [March 4, 2019, 5:51pm UTC](https://forum.ansible.com/t/concatenate-registered-variable-variables-in-vara-and-strings/29821/1 "2019-03-04T17:51:16Z")

</div>

I'm trying to concatenate registered variable from a previous task , external variable with a string ( ex: -stringhere) in a task.

I'm not getting the syntax to do it.

I tried below and it didn't work.

Command : echo {{ item.0 + "-" item.1 +"-stringhere"  
With\_items:  
&nbsp;&nbsp;&nbsp;- "{{ thevar.stdout }}  
&nbsp;&nbsp;&nbsp;&nbsp;- "{{ external var }}"

Please help with the syntax to do this.
