From d6083225e2d20fa63e445ce364906b96817bdbb4 Mon Sep 17 00:00:00 2001 From: Alexandre Pires Date: Mon, 30 Sep 2024 22:29:02 +0200 Subject: [PATCH] Refactor ansible inventory path in setup-ansible-env action.yml --- .github/actions/setup-ansible-env/action.yml | 2 +- .github/workflows/actions-validate.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-ansible-env/action.yml b/.github/actions/setup-ansible-env/action.yml index b268d5c..a843d43 100644 --- a/.github/actions/setup-ansible-env/action.yml +++ b/.github/actions/setup-ansible-env/action.yml @@ -48,7 +48,7 @@ runs: env: HOST_GROUP: ${{ inputs.host-group }} run: | - ansible-inventory ansible-inventory --list --yaml $HOST_GROUP | grep -oP '(\w+\.){2}\w+' | sort -u > /tmp/ansible_hosts + ansible-inventory -i ansible/inventory/hosts --list --yaml $HOST_GROUP | grep -oP '(\w+\.){2}\w+' | sort -u > /tmp/ansible_hosts echo "::set-output name=hosts::$(cat /tmp/ansible_hosts)" - name: Read SSH host keys from remote hosts diff --git a/.github/workflows/actions-validate.yml b/.github/workflows/actions-validate.yml index eacc468..f3a2421 100644 --- a/.github/workflows/actions-validate.yml +++ b/.github/workflows/actions-validate.yml @@ -45,7 +45,7 @@ jobs: - name: Test ansible run: | - ansible --version + ansible -m ping all - name: Test kubectl get nodes run: |