# is there a way of specifying ask-sudo-pass in the inventory file?

**URL:** <https://forum.ansible.com/t/is-there-a-way-of-specifying-ask-sudo-pass-in-the-inventory-file/13876>\
**Category:** Ansible Project\
**Created:** [November 9, 2013, 6:06pm UTC](https://forum.ansible.com/t/is-there-a-way-of-specifying-ask-sudo-pass-in-the-inventory-file/13876 "2013-11-09T18:06:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harry\_Percival](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@Harry\_Percival](https://forum.ansible.com/u/Harry_Percival)\
**Post date:** [November 9, 2013, 6:06pm UTC](https://forum.ansible.com/t/is-there-a-way-of-specifying-ask-sudo-pass-in-the-inventory-file/13876/1 "2013-11-09T18:06:28Z")

</div>

if i have one server in my inventory that requires sudo password, but all the others don’t… it would save me from having to remember to selectively use --ask-sudo-pass at the command-line…

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [November 10, 2013, 1:44pm UTC](https://forum.ansible.com/t/is-there-a-way-of-specifying-ask-sudo-pass-in-the-inventory-file/13876/2 "2013-11-10T13:44:34Z")

</div>

Not that I am aware of.

However, in 1.4 (devel) ansible\_sudo\_pass was added as an inventory hostvar. You may not be wanting this, but on another note, something else that changed with this addition, is that if a password is not required and a sudo password is provided, everything would still work as expected.

Previously if you provided a password to a host that didn’t require it, the task would fail.
