From a039f26262c59c3804958ecc379ba4fb60e6178b Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 16 Mar 2023 14:06:22 -0400 Subject: [PATCH] Update 'README.md' --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1a9229a..8d4b25a 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,22 @@ General useful scripts (mostly for Linux) # dns_fetch.py +--- This lovely python script allows you to fetch ip address form cloudflare dns records. Useful for remote servers with dynamic ips. You can define the env file "dns_resolv_env.json" as follows: ``` { - "auth_key": "key here (required without --auth)", - "zone_id": "zone id here (optional)", - "default_name": "website name here (optional)" + "auth_key": "key here", + "zone_id": "zone id here", + "default_name": "website name here" } ``` -The script has many useful featues: +### Notes +--- +- The env file itself is optional but the script will require you to pass your auth key with `--auth "key here"` +- If no zone id is provided the script will fetch and print from ALL zones on your cloudflare account. +- If default_name is not specified by either file or via `-n "name"`, filtering will be ignored +### Usage Examples +--- - `python3 dns_fetch.py -a -n -i` - Returns only the ip address of the A record corresponding to default_name. - This can be used in bash commands: `ssh username@$(python3 dns_fetch.py -a -n -i)`