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

sudoers modules should reference python3 #2

Open
genebean opened this issue Jun 27, 2022 · 3 comments · May be fixed by #3
Open

sudoers modules should reference python3 #2

genebean opened this issue Jun 27, 2022 · 3 comments · May be fixed by #3

Comments

@genebean
Copy link

Newer distros don't ship with a python executable, just a python3 one (Pop!_OS 22.04 is an example). It seems to me that

#!/usr/bin/env python
should be updated to look for python3.

@genebean genebean linked a pull request Jun 27, 2022 that will close this issue
@JonEllis
Copy link
Owner

Thanks for the feedback.

If I do that, then it'll no longer allow those without python3 to run it.
I've only ever run it through a virtual env, in which python will resolve to the version configured for that virtualenv.

Also, this module has since been included in the community.general collection (which had better visibility, so has further improvements like rule validation).

https://docs.ansible.com/ansible/devel/collections/community/general/sudoers_module.html

@genebean
Copy link
Author

Ah, good to know on both the virtual env bit and inclusion in general. I’ll try using it from there and see it “just works”

@preved911
Copy link

preved911 commented Oct 15, 2022

If I do that, then it'll no longer allow those without python3 to run it.

So, can we just remove python executable definition from module? I tested it in my case with python3 host, and it works well.

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

Successfully merging a pull request may close this issue.

3 participants