# Change VLAN using interactive playbook with prompt

**URL:** <https://forum.ansible.com/t/change-vlan-using-interactive-playbook-with-prompt/37410>\
**Category:** Ansible Project\
**Created:** [December 1, 2022, 9:45pm UTC](https://forum.ansible.com/t/change-vlan-using-interactive-playbook-with-prompt/37410 "2022-12-01T21:45:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hossein\_Malakooti](https://avatars.discourse-cdn.com/v4/letter/h/ee59a6/32.png) [@Hossein\_Malakooti](https://forum.ansible.com/u/Hossein_Malakooti)\
**Post date:** [December 1, 2022, 9:45pm UTC](https://forum.ansible.com/t/change-vlan-using-interactive-playbook-with-prompt/37410/1 "2022-12-01T21:45:53Z")

</div>

Hello Dear Fellows

I am a newbie to Ansible I searched for in existing discussions but I couldn’t find a clear answer , I was hoping you could help me find a write Config

I am trying to write a playbook who **prompt** user for Interface ID and change the VLAN accordingly , My playbook works without prompt but when I add prompt it throw a error

it looks like I am not supposed to put **vars\_promp** after config but I tried in different lines and non of them worked

**Here Is My Inventory Yaml File:**  
all:  
children:  
switches:  
children:  
ios:  
hosts:  
sw-1:  
ansible\_host: 10.10.10.20  
vars:  
ansible\_ssh\_common\_args: ‘-o StrictHostKeyChecking=no’  
ansible\_become: yes  
ansible\_connection: network\_cli  
ansible\_network\_os: ios  
ansible\_become\_method: enable  
ansible\_user: ncm  
ansible\_password: ncm

**And Here Is My Playbook**
