10 lines
414 B
Bash
10 lines
414 B
Bash
|
#!/bin/bash
|
||
|
# this script requires httpie and cfcli
|
||
|
#
|
||
|
cfcli zones -f json | jq -cr '.[] | .name,.id' | paste - - | awk '{print $1,$2}' | while read d k; do
|
||
|
cfcli ls -d $d -f json | jq -cr '.[] | select(.type == "A") | .name' | while read s; do
|
||
|
cat template.json | sed s/REPLACE_ME/$s/g | http https://api.cloudflare.com/client/v4/zones/$k/healthchecks \
|
||
|
X-Auth-Email:ken.fong@rackspace.com \
|
||
|
X-Auth-Key:xxx
|
||
|
done
|