Refactor ansible inventory path in setup-ansible-env action.yml
This commit is contained in:
@@ -48,7 +48,7 @@ runs:
|
|||||||
env:
|
env:
|
||||||
HOST_GROUP: ${{ inputs.host-group }}
|
HOST_GROUP: ${{ inputs.host-group }}
|
||||||
run: |
|
run: |
|
||||||
ansible-inventory ansible-inventory --list --yaml $HOST_GROUP | grep -oP '(\w+\.){2}\w+' | sort -u > /tmp/ansible_hosts
|
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 "::set-output name=hosts::$(cat /tmp/ansible_hosts)"
|
||||||
|
|
||||||
- name: Read SSH host keys from remote hosts
|
- name: Read SSH host keys from remote hosts
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Test ansible
|
- name: Test ansible
|
||||||
run: |
|
run: |
|
||||||
ansible --version
|
ansible -m ping all
|
||||||
|
|
||||||
- name: Test kubectl get nodes
|
- name: Test kubectl get nodes
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user