Skip to content

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