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

ansible_mitogen: rediscover python on local connection #994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qezz
Copy link

@qezz qezz commented Apr 30, 2023

Fixes the python discovery on delegate_to: localhost

Reading some opened issues it seems like there's an issue when delegating to other hosts as well. But I cannot check this behavior personally.

This is the first attempt to fix it, and I think it's not very effective to rediscover python on every local connection.
I think it's possible to make it rediscover conditionally, i.e. when switching from one host to another.

This has been tested against v0.3.3. The version on master doesn't work for me.

Related:

@mistotebe
Copy link

I get this issue when delegating in general e.g.:

hosts: suse-host
  tasks:
    - name: delegated with wrong python interpreter
      command: echo success
      delegate_to: debian-host

Will end up with /usr/bin/python3.6: No such file or directory and indeed debian doesn't really carry python 3.6 anymore, but ansible decided to pass the discovered interpreted onto it instead of discovering the correct one.

This looks the same as ansible/ansible#61002, maybe mitogen overrides a key part of the fix?

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