# Prompts from roles?

**URL:** <https://forum.ansible.com/t/prompts-from-roles/16381>\
**Category:** Ansible Project\
**Created:** [September 30, 2014, 3:25pm UTC](https://forum.ansible.com/t/prompts-from-roles/16381 "2014-09-30T15:25:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Hughes](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@Matt\_Hughes](https://forum.ansible.com/u/Matt_Hughes)\
**Post date:** [September 30, 2014, 3:25pm UTC](https://forum.ansible.com/t/prompts-from-roles/16381/1 "2014-09-30T15:25:40Z")

</div>

I know you can declare variables as part of a role:

> `└── wordpress-nginx ├── LICENSE.md ├── README.md ├── group_vars │ └── all ├── hosts.example ├── roles │ ├── common │ │ ├── files │ │ │ ├── RPM-GPG-KEY-EPEL-6 │ │ │ ├── epel.repo │ │ │ └── iptables-save │ │ ├── handlers │ │ │ └── main.yml │ │ └── vars │ │ └── main.yml`

but can you specify vars\_prompts under a role as well? I tried both vars\_prompt/main.yml and prompts/main.yml but my ansible-playbook prompts me for neither. Running with Ansible 1.7.2.

I have many playbooks that all share the same role. The prompts are really specific to the role, not an individual playbook.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [September 30, 2014, 7:16pm UTC](https://forum.ansible.com/t/prompts-from-roles/16381/2 "2014-09-30T19:16:33Z")

</div>

you can use the pause module to prompt for info and register a var  
with the result var.user\_input
