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-playbook not found on private runner #74

Closed
slaurijssen opened this issue Apr 25, 2023 · 1 comment
Closed

ansible-playbook not found on private runner #74

slaurijssen opened this issue Apr 25, 2023 · 1 comment

Comments

@slaurijssen
Copy link

slaurijssen commented Apr 25, 2023

Trying to run a playbook on a private runner to update an internal cluster

  build:
    name: Run free_disk_space
    runs-on: self-hosted
    steps:
     - name: checkout repo content
       uses: actions/checkout@v3 # checkout the repository content    
     - name: Run playbook
       uses: dawidd6/action-ansible-playbook@v2
       with:
        playbook: all_vms/free_disk_space.yml
        key: ${{secrets.ANSIBLE_KEY}}
     - name: ls
       if: always()
       run: ls -la /opt/pipx_bin

But self-hosted runner gets the error that ansible-playbook cant be found or is not executable.

runs-on: ubuntu-latest works but then the servers cant be accessed. There it is found in /opt/pipx_bin but that does not exist on self-hosted.

So where is the ansible-playbook normally or how to get it running on a private runner?

edit I just realized this action does not actually install ansible itself like the kubectl gh action does. so the solution is to first install ansible.

@dawidd6
Copy link
Owner

dawidd6 commented Apr 25, 2023

Yes, follow Ansible instructions on how to install it first for your Operating System.

Should work on any OS, if `ansible-playbook` command is available in `PATH`.

@dawidd6 dawidd6 closed this as completed Apr 25, 2023
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

No branches or pull requests

2 participants