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?  

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3ad6fd01-fe2f-4f50-ad9c-60614a6c6adcn%40googlegroups.com.

Reply via email to