# Depreciated \`ask\_sudo\_pass\` works while new-hotness \`ask\_become\_pass\` fails

**URL:** <https://forum.ansible.com/t/depreciated-ask-sudo-pass-works-while-new-hotness-ask-become-pass-fails/27159>\
**Category:** Ansible Project\
**Created:** [March 29, 2018, 11:52pm UTC](https://forum.ansible.com/t/depreciated-ask-sudo-pass-works-while-new-hotness-ask-become-pass-fails/27159 "2018-03-29T23:52:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Wyant](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Matthew\_Wyant](https://forum.ansible.com/u/Matthew_Wyant)\
**Post date:** [March 29, 2018, 11:52pm UTC](https://forum.ansible.com/t/depreciated-ask-sudo-pass-works-while-new-hotness-ask-become-pass-fails/27159/1 "2018-03-29T23:52:44Z")

</div>

I’m in the middle of migrating our Ansible projects to 2.5. Specifically, moving to the new network\_cli connection module.

So far, everything is working well, except using the `become` framework. The short of it is, in `ansible.cfg`, `ask_sudo_pass = True` has the desired effect of prompting for a become password, and defaulting an empty response to the SSH password. However, this throws a depreciation warning.

When attempting to use the new hotness, neither `ask_become_pass = True` nor `become_ask_pass = True` have the desired effect.

Am I missing something?

> ansible-playbook --version

ansible-playbook 2.5.0  
config file = /Users/XXXX/projects/ansible/ansible.cfg  
configured module search path = [u’/Users/XXXX/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /Users/XXXX/projects/ansible/venv/lib/python2.7/site-packages/ansible  
executable location = /Users/XXXX/projects/ansible/venv/bin/ansible-playbook  
python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]

ansible.cfg

[defaults]  
inventory = ./bin/inventory  
host\_key\_checking = False  
accelerate\_timeout = 60  
timeout = 30

ask\_pass = True  
ask\_become\_pass = True # What I /think/ should be used  
become\_ask\_pass = True # …the documentation is vague  
ask\_sudo\_pass = True . # Works without fail

[persistent\_connection]  
command\_timeout = 30

Command execution:

> ansible-playbook playbook.yml

Thanks,  
Matthew

---

<div class="post-metadata">

**Author:** ![flowerysong1](https://avatars.discourse-cdn.com/v4/letter/f/ecae2f/32.png) [@flowerysong1](https://forum.ansible.com/u/flowerysong1)\
**Post date:** [March 30, 2018, 2:23am UTC](https://forum.ansible.com/t/depreciated-ask-sudo-pass-works-while-new-hotness-ask-become-pass-fails/27159/2 "2018-03-30T02:23:04Z")

</div>

become\_ask\_pass goes in the [privilege\_escalation] section, not [defaults]. See [https://docs.ansible.com/ansible/2.5/reference\_appendices/config.html#default-become-ask-pass](https://docs.ansible.com/ansible/2.5/reference_appendices/config.html#default-become-ask-pass)

---

<div class="post-metadata">

**Author:** ![Matthew\_Wyant1](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@Matthew\_Wyant1](https://forum.ansible.com/u/Matthew_Wyant1)\
**Post date:** [March 30, 2018, 4:14pm UTC](https://forum.ansible.com/t/depreciated-ask-sudo-pass-works-while-new-hotness-ask-become-pass-fails/27159/3 "2018-03-30T16:14:15Z")

</div>

It’s always something simple. I’ve stared at that section of the documentation for hours, not sure how I missed it. Thanks!
