Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub action with Molecule is not working for sudo tasks #4365

Closed
7 tasks done
RanabirChakraborty opened this issue Jan 15, 2025 · 2 comments
Closed
7 tasks done

GitHub action with Molecule is not working for sudo tasks #4365

RanabirChakraborty opened this issue Jan 15, 2025 · 2 comments

Comments

@RanabirChakraborty
Copy link

RanabirChakraborty commented Jan 15, 2025

Prerequisites

  • This was not already reported in the past (duplicate check)
  • It does reproduce it with code from main branch (latest unreleased version)
  • I include a minimal example for reproducing the bug
  • The bug is not trivial, as for those a direct pull-request is preferred
  • Running pip check does not report any conflicts
  • I was able to reproduce the issue on a different machine
  • The issue is not specific to any driver other than 'default' one

Environment

molecule 24.12.0 using python 3.11
ansible:2.15.13
containers:23.6.0 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1
ec2:23.6.0 from molecule_plugins
default:24.12.0 from molecule
azure:23.6.0 from molecule_plugins
openstack:23.6.0 from molecule_plugins requiring collections: openstack.cloud>=2.1.0
vagrant:23.6.0 from molecule_plugins
podman:23.6.0 from molecule_plugins requiring collections: containers.podman>=1.7.0 ansible.posix>=1.3.0
gce:23.6.0 from molecule_plugins requiring collections: google.cloud>=1.0.2 community.crypto>=1.8.0
docker:23.6.0 from molecule_plugins requiring collections: community.docker>=3.4.11 ansible.posix>=1.4.0

What happened

While running molecule test via GitHub Action we figured out that the tasks with needed to have root privilege via become: true is failing now. But earlier it was working fine. Just wanted to know is there any changes included that is prohibiting this? or some change is needed to be done in order to fix this.

Below is the error we are seeing:

  TASK [Ensure required packages are installed.] *********************************
  fatal: [instance]: FAILED! => {"changed": false, "module_stderr": "sudo: PAM account management error: Authentication service cannot retrieve authentication info\nsudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

You can also see the details here in our GitHub Action CI.
We know that removing become: true from the tasks will pass the tests but our question then how come it was working earlier?

@artis3n
Copy link

artis3n commented Jan 15, 2025

You may be interested in rocky-linux/sig-cloud-instance-images#56

@ssbarnea
Copy link
Member

Please use the forum https://forum.ansible.com/tag/molecule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants