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

Setting python interpreter for selinux #3

Conversation

andrew-aiken
Copy link

Signed-off-by: andrew-aiken [email protected]

Overall Review of Changes:
Adding ansible_python_interpreter = /bin/python on all tasks that us ansible.posix.selinux.

Updated on:

  • 1.6.1.3-4
  • 1.6.1.5

Issue Fixes:
Changed python interpreter to be used, uses python3.7 by default, python library libselinux-python does not exist for the version.

FAILED! => {"changed": false, "msg": "Failed to import the required Python library (libselinux-python) on ip-10-270-30-100.us-north-1.compute.internal's Python /usr/bin/python3.7. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}

How has this been tested?:
Tested using packer on amazon linux 2 ecs optimized.

@uk-bolly
Copy link
Member

uk-bolly commented Jul 4, 2022

hi @andrew-aiken

Thank you again for taking the time to raise this PR. It maybe worth adding a new var into defaults/main for the python interpreter for those who may have updated python version? That way it can be easily overridden using an var precedence.

Many thanks once again

uk-bolly

@andrew-aiken
Copy link
Author

@uk-bolly
Create another ticket for that change, I can go from there if its needed.

@andrew-aiken
Copy link
Author

Having it use the python2 bin.

@uk-bolly uk-bolly mentioned this pull request Aug 5, 2022
@andrew-aiken
Copy link
Author

Merged in another PR

@andrew-aiken andrew-aiken deleted the selinux-module-using-wrong-interpreter branch November 16, 2022 15:11
@andrew-aiken andrew-aiken restored the selinux-module-using-wrong-interpreter branch November 16, 2022 15:12
@andrew-aiken andrew-aiken deleted the selinux-module-using-wrong-interpreter branch November 16, 2022 15:17
uk-bolly added a commit that referenced this pull request Jun 7, 2024
* Add logic to IAC branch

Signed-off-by: Mark Bolwell <[email protected]>

* Add logic to IAC branch

Signed-off-by: Mark Bolwell <[email protected]>

* Add logic to IAC branch

Signed-off-by: Mark Bolwell <[email protected]>

* Add logic to IAC branch

Signed-off-by: Mark Bolwell <[email protected]>

* Tidy up of naming

Signed-off-by: Mark Bolwell <[email protected]>

* Workflow alignment

Signed-off-by: Mark Bolwell <[email protected]>

* Updated

Signed-off-by: Mark Bolwell <[email protected]>

* ability to change ansible version

Signed-off-by: Mark Bolwell <[email protected]>

* tidy up

Signed-off-by: Mark Bolwell <[email protected]>

* ability to change ansible version

Signed-off-by: Mark Bolwell <[email protected]>

---------

Signed-off-by: Mark Bolwell <[email protected]>
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 this pull request may close these issues.

2 participants