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

Fixes to adjust with latest ansible v2.16.3 #85

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

anoopcs9
Copy link
Collaborator

@anoopcs9 anoopcs9 commented Feb 14, 2024

Very recently on CentOS Stream 8 ansible version got updated to v2.16.3 built with Python 3.12. Due to unavailability of python 3.12 module for jmespath playbook execution is expected to fail. Therefore switch the python module installation from RPMs to pip where it can be versioned.

Additionally due to a regression in first_found plugin we switch to absolute paths wherever required to find OS specific files. See ansible/ansible#82695 for more details.

depends on samba-in-kubernetes/samba-centosci#54

@anoopcs9 anoopcs9 marked this pull request as ready for review February 14, 2024 18:33
Copy link
Collaborator

@xhernandez xhernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding version dependencies, couldn't we install jmespath using pip instead of the CentOS package ?

@anoopcs9
Copy link
Collaborator Author

Instead of adding version dependencies, couldn't we install jmespath using pip instead of the CentOS package ?

It is my guess that pip executable will also need to used accordingly with required Python version(pip3.11, pip3.12 etc). So its a choice between specifying ansible version and pip executable version. Let me verify that it is the case here.

@anoopcs9
Copy link
Collaborator Author

Instead of adding version dependencies, couldn't we install jmespath using pip instead of the CentOS package ?

It is my guess that pip executable will also need to used accordingly with required Python version(pip3.11, pip3.12 etc). So its a choice between specifying ansible version and pip executable version. Let me verify that it is the case here.

Ok. I think I got it confused. I'll check by replacing jmespath python module installation from RPM to pip with required versioned executable.

@anoopcs9 anoopcs9 force-pushed the c8s-restrict-ansible-vers branch 2 times, most recently from 4f80db3 to bf0500d Compare February 15, 2024 08:54
@anoopcs9 anoopcs9 changed the title setup: Restrict to ansible version built with Py3.11 setup: Install jmespath python module using pip Feb 15, 2024
@anoopcs9 anoopcs9 force-pushed the c8s-restrict-ansible-vers branch 2 times, most recently from ac4f9bf to e375047 Compare February 16, 2024 08:56
@anoopcs9 anoopcs9 changed the title setup: Install jmespath python module using pip Fixes to adjust with latest ansible v2.16.3 Feb 16, 2024
@anoopcs9
Copy link
Collaborator Author

/retest all

@anoopcs9
Copy link
Collaborator Author

/retest all

I've manually adjusted required jobs to pick up samba-in-kubernetes/samba-centosci#54 for their execution.

xhernandez
xhernandez previously approved these changes Feb 16, 2024
Copy link
Collaborator

@xhernandez xhernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit ugly but I don't see any other way to do that. Let's make it work for now.

@spuiuk
Copy link
Collaborator

spuiuk commented Feb 16, 2024

Isn't playbooks/roles/setup.prep/tasks/centos.yml
being included anywhere? Can we get it to also install the module using pip?

@anoopcs9
Copy link
Collaborator Author

Isn't playbooks/roles/setup.prep/tasks/centos.yml being included anywhere? Can we get it to also install the module using pip?

We discussed offline and decided to have pip installation step merged at playbooks/roles/setup.prep/tasks/centos{8,9}.yml.

Very recently on CentOS Stream 8 ansible version got updated to v2.16.3
built with Python 3.12. Due to unavailability of python 3.12 module for
jmespath playbook execution is expected to fail. Therefore switch the
python module installation from RPMs to pip where it can be versioned.

Signed-off-by: Anoop C S <[email protected]>
Recent update to ansible v2.16.3 broke[1] the promised action of
first_found plugin to find files with relative paths when tasks are
included from a different subdirectory other than where its main.yml
is located. Thus we temporarily switch to use absolute paths wherever
required until fix is available with an updated package.

[1] ansible/ansible#82695

Signed-off-by: Anoop C S <[email protected]>
@anoopcs9 anoopcs9 requested a review from spuiuk February 19, 2024 06:00
Copy link

dpulls bot commented Feb 20, 2024

🎉 All dependencies have been resolved !

@anoopcs9 anoopcs9 merged commit 8d3e6e8 into samba-in-kubernetes:main Feb 20, 2024
6 checks passed
@anoopcs9 anoopcs9 deleted the c8s-restrict-ansible-vers branch February 20, 2024 08:41
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.

3 participants