I'd probably throw in some checks for the return code given by curl.
Also, while I can't speak for the other applications, Ansible has this feature built-in.