From 40bbb4904c5ae842535b3f4e89ab2d1aeed745a7 Mon Sep 17 00:00:00 2001 From: Alexandre Pires Date: Mon, 30 Sep 2024 22:41:21 +0200 Subject: [PATCH] Refactor ansible inventory path and update output in get-host-info action.yml --- .github/actions/get-host-info/action.yml | 2 +- .github/actions/setup-ansible-env/action.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/get-host-info/action.yml b/.github/actions/get-host-info/action.yml index 469f872..48104dd 100644 --- a/.github/actions/get-host-info/action.yml +++ b/.github/actions/get-host-info/action.yml @@ -28,4 +28,4 @@ runs: TARGET_HOST: ${{ inputs.target-host }} run: | system_id=$(ansible -i ansible/inventory/hosts -b -u $ANSIBLE_USER -m shell -a "read_system_id" $TARGET_HOST | tail -1) - echo "::set-output name=system-id::$system_id" + echo "system-id=$system_id" >> $GITHUB_OUTPUT diff --git a/.github/actions/setup-ansible-env/action.yml b/.github/actions/setup-ansible-env/action.yml index a843d43..b3ece59 100644 --- a/.github/actions/setup-ansible-env/action.yml +++ b/.github/actions/setup-ansible-env/action.yml @@ -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