# Ansible is asking for sudo password after updating Visudo?

**URL:** <https://forum.ansible.com/t/ansible-is-asking-for-sudo-password-after-updating-visudo/39694>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [January 18, 2025, 6:21pm UTC](https://forum.ansible.com/t/ansible-is-asking-for-sudo-password-after-updating-visudo/39694 "2025-01-18T18:21:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanemhartley](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shanemhartley/32/7786_2.png) [@shanemhartley](https://forum.ansible.com/u/shanemhartley)\
**Post date:** [January 18, 2025, 6:21pm UTC](https://forum.ansible.com/t/ansible-is-asking-for-sudo-password-after-updating-visudo/39694/1 "2025-01-18T18:21:30Z")

</div>

Here is my ansible.cfg

# Ansible default parameters

[defaults]

inventory = ./inventory

private\_key\_file = /path/to/private\_key

collections\_paths = /path/to/collections

roles\_path = /path/to/roles

forks = 50

stdout\_call = debug

pipelining = true

host\_key\_checking = false

remote\_user = awx

ask\_pass = false

```
# Ansible become parameters  

```

[privilege\_escalation]

become = true

become\_user = root

become\_method = sudo

become\_ask\_pass = false

```
# Updating VISUDO so user can escalate privileges without being prompted for a password 

```

%wheel ALL=(ALL) NOPASSWD: ALL

usermod –a –G wheel awx

User awx is in wheel, and I can ssh passwordless, as well as run commands with sudo and no password, but when I run a playbook it says “missing sudo password”?

---

<div class="post-metadata">

**Author:** ![shanemhartley](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shanemhartley/32/7786_2.png) [@shanemhartley](https://forum.ansible.com/u/shanemhartley)\
**Post date:** [January 18, 2025, 7:42pm UTC](https://forum.ansible.com/t/ansible-is-asking-for-sudo-password-after-updating-visudo/39694/2 "2025-01-18T19:42:46Z")

</div>

echo “awx ALL=(ALL) NOPASSWD: ALL” \>\> /etc/sudoers.d/awx

This works, but I have to add it to all the remote hosts, and it won’t work for RHCE, since the remote hosts are wiped, and replaced with new hosts after the exam. Is there a better way to do this?

---

<div class="post-metadata">

**Author:** ![shanemhartley](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shanemhartley/32/7786_2.png) [@shanemhartley](https://forum.ansible.com/u/shanemhartley)\
**Post date:** [January 18, 2025, 8:22pm UTC](https://forum.ansible.com/t/ansible-is-asking-for-sudo-password-after-updating-visudo/39694/3 "2025-01-18T20:22:27Z")

</div>

Any ideas on this? I have tried just about everything I can find online for this issue

---

<div class="post-metadata">

**Author:** ![bcoca](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bcoca/32/9269_2.png) [@bcoca](https://forum.ansible.com/u/bcoca)\
**Post date:** [January 20, 2025, 3:49pm UTC](https://forum.ansible.com/t/ansible-is-asking-for-sudo-password-after-updating-visudo/39694/4 "2025-01-20T15:49:44Z")

</div>

after you update a user’s membership you need to login again, your permissions are not refreshed in the current session. Also, not pertaining to this change, but sudo also caches information, use -k or -K (as needed) to reset that cache.
