dawidd6 / action-ansible-playbook

:gear: A GitHub Action for running Ansible playbooks
MIT License
296 stars 66 forks source link

Ansible Galaxy : command not found #66

Closed nlamirault closed 1 year ago

nlamirault commented 1 year ago

Hi, I try your Github Action to execute an Ansible playbook :

name: Test / Linux

on:
  # - push
  - pull_request

jobs:
  build:
    runs-on: ubuntu-latest
    steps:

      - name: Checkout
        uses: actions/checkout@v3.1.0

      - name: Run Ansible playbook
        uses: dawidd6/action-ansible-playbook@v2.6.1
        with:
          playbook: divona_linux.yml
          directory: ./
          requirements: divona/requirements-linux.yml
          # the ssh private key for ansible to use to connect to the servers, stored as "ansible_ssh_private_key" in the GitHub secrets
          # key: ${{ secrets.ansible_ssh_private_key }}
          # the ansible inventory to use, stored as "ansible_inventory" in the GitHub secrets
          inventory: inventories/linux.ini
          options: |
            --verbose

and the output :

Run dawidd6/action-ansible-playbook@v2.6.1
  with:
    playbook: divona_linux.yml
    directory: ./
    requirements: divona/requirements-linux.yml
    inventory: inventories/linux.ini
    options: --verbose

Error: Unable to locate executable file: ansible-galaxy. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

Do you have any idea ?

dawidd6 commented 1 year ago

GitHub' Ubuntu image does not seem to include this command or it is not in PATH. Either find it on the runner or install it beforehand.

nlamirault commented 1 year ago

thanks sorry for noise.