# Getting error when trying to get 2 variables in vars\_prompt

**URL:** <https://forum.ansible.com/t/getting-error-when-trying-to-get-2-variables-in-vars-prompt/29745>\
**Category:** Ansible Developer\
**Created:** [February 22, 2019, 2:21pm UTC](https://forum.ansible.com/t/getting-error-when-trying-to-get-2-variables-in-vars-prompt/29745 "2019-02-22T14:21:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kendon\_Emmons](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@Kendon\_Emmons](https://forum.ansible.com/u/Kendon_Emmons)\
**Post date:** [February 22, 2019, 2:21pm UTC](https://forum.ansible.com/t/getting-error-when-trying-to-get-2-variables-in-vars-prompt/29745/1 "2019-02-22T14:21:27Z")

</div>

I am trying to get two variables in my vars\_prompt, for username and password.

My playbook currently looks like this:

`

---

<div class="post-metadata">

**Author:** ![Kendon\_Emmons](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@Kendon\_Emmons](https://forum.ansible.com/u/Kendon_Emmons)\
**Post date:** [February 22, 2019, 2:24pm UTC](https://forum.ansible.com/t/getting-error-when-trying-to-get-2-variables-in-vars-prompt/29745/2 "2019-02-22T14:24:25Z")

</div>

Actually just solved the problem myself. It seem the issue lied within the line of my playbook:

`  
prompt: “Enter password for new user account {{ user\_name }}”

`

My thought is that the {{ user\_name }} variable cannot be referenced since the vars\_prompt method has not finalized yet. Removing the reference of the user\_name variable solved the issue for me.

Now my code looks as so, running as wished:

`
