Refactor Ansible actions to improve host inventory handling
This commit is contained in:
@@ -48,7 +48,7 @@ runs:
|
||||
env:
|
||||
HOST_GROUP: ${{ inputs.host-group }}
|
||||
run: |
|
||||
ansible-inventory -i inventory/hosts --list --yaml $HOST_GROUP | grep -oP '(\w+\.){2}\w+' | sort -u > /tmp/ansible_hosts
|
||||
ansible-inventory -i inventory/hosts --list --yaml $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
|
||||
|
||||
- name: Read SSH host keys from remote hosts
|
||||
|
||||
Reference in New Issue
Block a user