Skip to content

Commit

Permalink
error on empty inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemosphere committed Nov 2, 2023
1 parent 5f99c0a commit 1f90aec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/load_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,17 @@ jobs:
- name: Generate list of host:port for config generator
working-directory: node
run: |
set -o pipefail
sudo apt update && sudo apt install -y gettext-base
tmp_inventory=$(cat ../infrastructure/loadtests/ansible/gcp.yml)
echo "${tmp_inventory}" | envsubst > ../infrastructure/loadtests/ansible/gcp.yml
ansible-inventory -i ../infrastructure/loadtests/ansible/gcp.yml --list | jq -r '.gcp_loadtest.hosts[]' | \
ansible-inventory -i ../infrastructure/loadtests/ansible/gcp.yml --list | \
tee /tmp/ansible_output.txt | \
grep -q "No inventory was parsed" && { echo "Error: No inventory was parsed."; exit 1; }
jq -r '.gcp_loadtest.hosts[]' < /tmp/ansible_output.txt | \
awk -v port=${{ env.NODE_PORT }} -F\" '{print $1 ":" port}' > ips_prts.txt
- name: Install node build dependencies
Expand Down
11 changes: 0 additions & 11 deletions infrastructure/loadtests/ansible/extract.py

This file was deleted.

0 comments on commit 1f90aec

Please sign in to comment.