-
Notifications
You must be signed in to change notification settings - Fork 11
Description
When I'm running my geerlingguy/docker-rockylinux9-ansible containers in CI in GitHub Actions to test my Ansible projects, I have been seeing the following errors whenever running a task with sudo/`become:
TASK [Gathering Facts] *********************************************************
fatal: [instance]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3.9"}, "failed": true, "module_stderr": "sudo: PAM account management error: Authentication service cannot retrieve authentication info\nsudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}
Other users have reported the same, for both Rocky Linux 8 and 9, for the past few weeks. For example: geerlingguy/docker-rockylinux9-ansible#6
[root@25c3908841c3 /]# sudo "hello world"
sudo: PAM account management error: Authentication service cannot retrieve authentication info
sudo: a password is required
This error is not reproducible on a Mac running Docker Desktop, but it is in instances running docker-ce or on GitHub Actions. We use sudo in the container because it is testing/verifying playbooks that are run against instances where sudo may be required.
In the past this was never an issue; it seems like it could be also related to the yum install sudo command that I run that updates PAM (perhaps?) in my Ansible/Docker project: https://github.com/geerlingguy/docker-rockylinux9-ansible/blob/master/Dockerfile#L22
Is there something that's changed in Rocky Linux lately that could be causing this?