Skip to content

Commit

Permalink
feat(ansible): create inventory file
Browse files Browse the repository at this point in the history
  • Loading branch information
gtempus committed Nov 4, 2023
1 parent c3868b7 commit 11ca3e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/api_triggered_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ jobs:
aws-region: us-east-2

- name: Generate Ansible Inventory
working-directory: ./ansible
working-directory: ./terraform
run: |
echo "[minecraft_servers]" > inventory
echo "[minecraft_servers]" > ../ansible/inventory
terraform output -json | jq -r '.minecraft_server_public_ip.value[]' | while read ip; do
echo "minecraft_server ansible_host=${ip} ansible_user=ubuntu" >> inventory
echo "minecraft_server ansible_host=${ip} ansible_user=ubuntu" >> ../ansible/inventory
done
cat ./inventory
cat ../ansible/inventory
- name: Run Ansible Playbook
working-directory: ./ansible
Expand Down

0 comments on commit 11ca3e3

Please sign in to comment.