fix: Correct ansible-inventory command to include --limit option for host group filtering
This commit is contained in:
@@ -54,7 +54,7 @@ runs:
|
|||||||
env:
|
env:
|
||||||
HOST_GROUP: ${{ inputs.host-group }}
|
HOST_GROUP: ${{ inputs.host-group }}
|
||||||
run: |
|
run: |
|
||||||
ansible-inventory -i inventory/hosts --list --yaml $HOST_GROUP | grep -oP '([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}' | sort -u > /tmp/ansible_hosts
|
ansible-inventory -i inventory/hosts --list --yaml --limit $HOST_GROUP | grep -oP '([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}' | sort -u > /tmp/ansible_hosts
|
||||||
echo "hosts=$(cat /tmp/ansible_hosts)" >> $GITHUB_OUTPUT
|
echo "hosts=$(cat /tmp/ansible_hosts)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Read SSH host keys from remote hosts
|
- name: Read SSH host keys from remote hosts
|
||||||
|
|||||||
Reference in New Issue
Block a user