diff --git a/Makefile b/Makefile index d2bb1e5..1a42b47 100644 --- a/Makefile +++ b/Makefile @@ -242,24 +242,18 @@ endef .PHONY: ssh-firewall ssh-firewall: - $(eval firewall = $(shell ssh -F files/ssh/config leaf01 "vtysh -c 'show bgp neighbors firewall json' | \ - python3 -c 'import sys, json; data = json.load(sys.stdin); key = next(iter(data)); print(data[key][\"bgpNeighborAddr\"] + \"%\" + key)'" \ - )) - ssh -F files/ssh/config $(firewall) $(COMMAND) + $(eval address = $(call get-ipv6-link-local-address,firewall)) + ssh -F files/ssh/config $(address) $(COMMAND) .PHONY: ssh-machine01 ssh-machine01: - $(eval machine = $(shell ssh -F files/ssh/config leaf01 "vtysh -c 'show bgp vrf $(VRF) neighbors machine01 json' | \ - python3 -c 'import sys, json; data = json.load(sys.stdin); key = next(iter(data)); print(data[key][\"bgpNeighborAddr\"] + \"%\" + key)'" \ - )) - ssh -F files/ssh/config $(machine) $(COMMAND) + $(eval address = $(call get-ipv6-link-local-address,machine01,$(VRF))) + ssh -F files/ssh/config $(address) $(COMMAND) .PHONY: ssh-machine02 ssh-machine02: - $(eval machine = $(shell ssh -F files/ssh/config leaf01 "vtysh -c 'show bgp vrf $(VRF) neighbors machine02 json' | \ - python3 -c 'import sys, json; data = json.load(sys.stdin); key = next(iter(data)); print(data[key][\"bgpNeighborAddr\"] + \"%\" + key)'" \ - )) - ssh -F files/ssh/config $(machine) $(COMMAND) + $(eval address = $(call get-ipv6-link-local-address,machine02,$(VRF))) + ssh -F files/ssh/config $(address) $(COMMAND) .PHONY: connect-to-cloudflare connect-to-cloudflare: