Rex
Rex copied to clipboard
Strip ANSI color from Linux ip output
On latest Debian versions the command "Ip add show" outputs color chars on interface names. This patch uses the Term::ANSIColor lib to strip them fixing garbage in keys of Rex Template vars. To test the problem simply dump gathered infos from a Debian Trixie (with iproute2 package installed) , and check the output of key interfaces for "$__36m" word: rex -H MyDebian-e "say dump_system_information;" ... $__36mens192_ip = '' $__36mlo_netmask = '' $__36mens192_netmask = '' ....