What is Nostr?
uvok /
npub1k90…ag6a
2024-07-09 18:31:50

uvok on Nostr: Got output from ansible across several hosts with ip -6 -j a show (In the form of ...

Got output from ansible across several hosts with
ip -6 -j a show

(In the form of {"host": "...output...",...})

Wanted to get a nice overview of host/interface/ip addresses.

Tried jq, got as far as

jq '[to_entries[] | .value = [(.value[].ifname)]] | from_entries'

Said "FUCK IT" and went with this Python:

for host,cont in jj.items():
print(host)
for ifinfo in cont:
print(f" {ifinfo['ifname']}")
for adr in ifinfo["addr_info"]:
print(f" {adr['local']}")


Know when to use which tool!
Author Public Key
npub1k90996tz8kj3eljxqqsw0k385zrdu7z8xxh82hsth98f78q38jeqdsag6a