Ansible is asking for sudo password after updating Visudo?

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”?

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?

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

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.