When using 'become: true' in one of your tasks and centralized users (389-ds, FreeIPA, Active Directory) the authentication daemon needs to validate if the user is allowed to run sudo on that host.
Timeouts can happen for various reasons, so it's best to check /var/log/secure or /var/log/auth for errors. In my case, I got this error:
pam_sss(systemd-user:account): Access denied for user executor: 6 (Permission denied)
The first thing to check is if the user is allowed to use that service on the host. In my case with FreeIPA, the result is just a hbactest command away:
[archy@ipa02 ~]$ ipa hbactest --user 'executor' --host 'logstash02.archyslife.lan' --service 'sudo' | egrep -vi 'not'
--------------------
Access granted: True
--------------------
Matched rules: allow_executor_all_hosts
In further debugging, I found that the swap and ram were heavily utilized on that host. The solution here was to restart the service that was causing the utilization and restarting sssd:
[archy@logstash02 ~]$ su - -c 'systemctl restart logstash.service sssd.service'
Password:
[archy@logstash02 ~]$
If you rerun the ansible play, it should go through without timeout errors.
Feel free to comment and / or suggest a topic.
Comments
Post a Comment