# Prompt user for input in Custom Ansible Module

**URL:** <https://forum.ansible.com/t/prompt-user-for-input-in-custom-ansible-module/22552>\
**Category:** Ansible Developer\
**Created:** [September 15, 2016, 8:25am UTC](https://forum.ansible.com/t/prompt-user-for-input-in-custom-ansible-module/22552 "2016-09-15T08:25:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moses\_Lim\_Him\_Kuong](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@Moses\_Lim\_Him\_Kuong](https://forum.ansible.com/u/Moses_Lim_Him_Kuong)\
**Post date:** [September 15, 2016, 8:25am UTC](https://forum.ansible.com/t/prompt-user-for-input-in-custom-ansible-module/22552/1 "2016-09-15T08:25:11Z")

</div>

How to prompt user for input inside the custom module?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [September 15, 2016, 12:43pm UTC](https://forum.ansible.com/t/prompt-user-for-input-in-custom-ansible-module/22552/2 "2016-09-15T12:43:27Z")

</div>

Remember that the modules run on the remote machines, so that’s probably not desirable.

You can use vars\_prompt at the begining of a playbook to gather some variables which are passed to your custom module when it is run though.

Hope this helps,

Jon

---

<div class="post-metadata">

**Author:** ![Moses\_Lim\_Him\_Kuong](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@Moses\_Lim\_Him\_Kuong](https://forum.ansible.com/u/Moses_Lim_Him_Kuong)\
**Post date:** [September 15, 2016, 1:23pm UTC](https://forum.ansible.com/t/prompt-user-for-input-in-custom-ansible-module/22552/3 "2016-09-15T13:23:52Z")

</div>

I need user to fill in certain information on adhoc basis as i need to do some conditioning checking as well step by step.
