Skip to content

fix: ensure ansible_python_interpreter is set in all playbook runs#259

Merged
tropicrainforest merged 1 commit intomainfrom
set-ansible_python_interpreter-in-all
Apr 7, 2026
Merged

fix: ensure ansible_python_interpreter is set in all playbook runs#259
tropicrainforest merged 1 commit intomainfrom
set-ansible_python_interpreter-in-all

Conversation

@tropicrainforest
Copy link
Copy Markdown
Contributor

This PR fixes ansible_python_interpreter not being passed to the version check playbook, causing Ansible to fall back to auto-discovery and pick up the default system Python on managed nodes. On hosts like levante4.dkrz.de the system Python is older than 3.8, which is incompatible with ansible-core ≥ 2.17 module syntax and breaks the deployment.

A helper is introduced so that both the main deployment and version check code paths always set the interpreter consistently.

An alternative would be to exclude core from this list, but that only masks the symptom; any new service added in the future would face the same issue again.

Copy link
Copy Markdown
Contributor

@antarcticrainforest antarcticrainforest left a comment

Choose a reason for hiding this comment

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

LGTM!

But looking at this I doubt it solves the problem - because my understanding from the old code is that it shouldn't have bin there in the first place.

@tropicrainforest tropicrainforest merged commit 876d1d4 into main Apr 7, 2026
18 checks passed
@tropicrainforest tropicrainforest deleted the set-ansible_python_interpreter-in-all branch April 7, 2026 13:27
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