# Two variables in one variable

**URL:** <https://forum.ansible.com/t/two-variables-in-one-variable/29681>\
**Category:** Ansible Project\
**Created:** [February 14, 2019, 10:53am UTC](https://forum.ansible.com/t/two-variables-in-one-variable/29681 "2019-02-14T10:53:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryad9200000](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Post date:** [February 14, 2019, 10:53am UTC](https://forum.ansible.com/t/two-variables-in-one-variable/29681/1 "2019-02-14T10:53:08Z")

</div>

hi,

How to put two variables in one variable please ?

I want that my variable get value of two other variables.

Exemple:

var\_1: {{ var\_2 }} + {{ var\_3 }}

or

var\_1: {{ var\_2 }}\_{{ var\_3 }}

Thank you very much !! 🙂

Regards,

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [February 14, 2019, 11:00am UTC](https://forum.ansible.com/t/two-variables-in-one-variable/29681/2 "2019-02-14T11:00:56Z")

</div>

Use set\_fact module

Regards,

JYL

---

<div class="post-metadata">

**Author:** ![ryad9200000](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Post date:** [February 14, 2019, 1:59pm UTC](https://forum.ansible.com/t/two-variables-in-one-variable/29681/3 "2019-02-14T13:59:40Z")

</div>

Thank you ! 🙂

Regards,
