From ca2cbea60464bbd251023336c61a8dfbb91c0767 Mon Sep 17 00:00:00 2001 From: Curtis Wilson Date: Fri, 26 Nov 2021 15:01:54 -0500 Subject: [PATCH] Added a script to poll AWS node status. --- get-aws-node-status.sh | 4 ++++ get-vm-ips.sh | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100755 get-aws-node-status.sh diff --git a/get-aws-node-status.sh b/get-aws-node-status.sh new file mode 100755 index 0000000..aad14b0 --- /dev/null +++ b/get-aws-node-status.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +aws ec2 describe-instance-status | \ + jq '.InstanceStatuses[] | {id: .InstanceId, instance_status: .InstanceStatus.Status, system_status: .SystemStatus.Status}' diff --git a/get-vm-ips.sh b/get-vm-ips.sh index cbdc820..230b5cf 100755 --- a/get-vm-ips.sh +++ b/get-vm-ips.sh @@ -48,7 +48,6 @@ ANSIBLE_INV="$( sed -z 's/\n/,/g;s/,$/\n/g')" # Create an inventory file for ansible. -echo "# Wrote an Ansible inventory file at ./inventory" echo "[k8s_nodes]" > inventory echo $VM_IP_EXPORTS | \ sed 's/"//g' | \