Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created November 22, 2019 03:43
Show Gist options
  • Save KyMidd/de62b88590e9939ae081e48d39fe067c to your computer and use it in GitHub Desktop.
Save KyMidd/de62b88590e9939ae081e48d39fe067c to your computer and use it in GitHub Desktop.
## Check if ip-ranges.json has updated in past 3 minutes, exit. 3 minutes chosen because scripts runs every 3 minutes
if [[ $(find ip-ranges.json -mmin +3) ]]; then
echo "No changes, exiting"
echo $DATE "No updated IPs from AWS, exiting script - failed=0" >> /var/log/ansible.log
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment