I have a playbook that contains the two separate hosts one is 'localhost' and another is 'xyz'.

```
- hosts: localhost
  connection: local
  gather_facts: False
  vars_prompt: 
    - name: "value" 
      prompt: "Enter your value" 
      private: yes
  roles:
    - a
###

- name: Define xyz
  hosts: xyz

  roles:
    - a
    - b

```

When we run the above playbook then in 'localhost' var\_promot take the values from the user and after that, I want to use those values in the 'xyz' host roles in shell commands.

Currently, Inside 'a' role I have this type of code but it gives me an error.

```
- name: echo
  shell: " echo {{ value | urlencode }}"
  register: sout

```

Any idea how to do that or any other way for it?