Refactor ansible inventory path and update output in get-host-info action.yml

This commit is contained in:
2024-09-30 22:41:21 +02:00
parent 85459002d3
commit 40bbb4904c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ runs:
HOST_GROUP: ${{ inputs.host-group }}
run: |
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)"
echo "hosts=$(cat /tmp/ansible_hosts)" >> $GITHUB_OUTPUT
- name: Read SSH host keys from remote hosts
shell: bash
@@ -78,7 +78,7 @@ runs:
echo 'sectool vault get SSH_PASSWORD' > ~/.ssh_askpass && chmod +x ~/.ssh_askpass
DISPLAY=None SSH_ASKPASS=~/.ssh_askpass ssh-add ~/.ssh/id_ecdsa < /dev/null
rm ~/.ssh_askpass
echo "::set-output name=ssh-auth-sock::$SSH_AUTH_SOCK"
echo "ssh-auth-sock=$SSH_AUTH_SOCK" >> $GITHUB_OUTPUT
- name: Check SSH Connection to remote hosts
shell: bash