[WARNING]: No python interpreters found for host

343 views
Skip to first unread message

Christopher Bachmeyer

unread,
Mar 8, 2024, 10:53:46 AM3/8/24
to Ansible Project
Hey all, 

I set up a deployment pipeline using GitHub actions and am experiencing an issue with Ansible seemingly not being able to find the python interpreter.  

The step in the job is as follows.  I set the interpreter_python param and tried 'auto' as well as '/usr/bin/python3' but to no avail.  I have the collections_path set too since this is a windows post config step.  

    - name: Windows configuration via Ansible
      uses: dawidd6/action-ansible-playbook@v2
      with:
        playbook: ansible/windows/site.yml
        # directory: ansible/windows/
        configuration: |
          [defaults]
          callbacks_enabled = ansible.posix.profile_tasks, stdout_callback = yaml, interpreter_python = /usr/bin/python3, collections_path = ./collections/ansible_collections/
        inventory: |
          [all]
          ${{ steps.vmip.outputs.vmIp }}
        vault_password: ${{secrets.VAULT_PASSWORD}}
        options: |
          -vvv

The full traceback is:
At line:4 char:1

+ /usr/bin/python C:\Users\ansible_svc\AppData\Local\Temp\ansible-tmp-1 ...

+ ~~~~~~~~~~~~~~~
[WARNING]: No python interpreters found for host 10.188.218.55 (tried
['/usr/bin/python', 'python3.7', 'python3.6', 'python3.5', 'python2.7',
'python2.6', '/usr/libexec/platform-python', '/usr/bin/python3', 'python'])
fatal: [10.188.218.55]: FAILED! => ***
    "ansible_facts": ***
        "discovered_interpreter_python": "/usr/bin/python"
    ***,
    "changed": false,
    "msg": "The term '/usr/bin/python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
***

I'm using a pool of self-hosted runners with Ansible and Python 3.8.10 as a dependency.  Everything should be there.  

Any ideas, folks?  
Reply all
Reply to author
Forward
0 new messages