I think you can only do this with custom Extension Attributes. As far as I know, you can't modify the way the JSS gathers information in this regard. You can make some choices about what general categories get captured when inventory is collected, but you can't tweak specific items to pull different information. That is coded into the jamf binary most likely.
I already made Extension Attributes to capture the first six MAC addresses. Is there a way in with the command line and grep? to change what gets assigned to en0 and en1?
So let me make sure I understand. You want to capture only the MAC addresses from Wi-Fi and Thunderbolt Ethernet and nothing else, correct?
If so, yes that can be done. Were you looking to have these as two separate Extension Attributes? That would probably make the most sense since it would make for easier reporting later. Each field can have it's own column in a report rather than being lumped into one for example.
Example EA for capturing Wi-Fi MAC address
#!/bin/bash
WIFI_MAC=$(/usr/sbin/networksetup -listallhardwareports | awk '/Wi-Fi/{getline; getline; print $NF}')
if [ ! -z "$WIFI_MAC" ]; then
echo "<result>$WIFI_MAC</result>"
else
echo "<result>Not Available</result>"
fi
For Thunderbolt Ethernet, it would probably be this. i don't have a TBolt Enet dongle connected to my Mac at the moment, so for me it reports Not Available
#!/bin/bash
TBOLT_MAC=$(/usr/sbin/networksetup -listallhardwareports | awk '/Thunderbolt Ethernet/{getline; getline; print $NF}')
if [ ! -z "$TBOLT_MAC" ]; then
echo "<result>$TBOLT_MAC</result>"
else
echo "<result>Not Available</result>"
fi
>>So let me make sure I understand. You want to capture only the MAC addresses from Wi-Fi and Thunderbolt Ethernet and nothing else, correct?
This is correct but extension attributes are not going to work for this. I need Wi-Fi to be en0 and Thunderbolt Ethernet to be en1 so these get captured in the default inventory in JAMF Pro for the Primary MAC address field and the Secondary MAC address field. Aruba is ONLY using these two fields from JAMF Pro so extension attributes are useless.
If anyone is interested, I created a script to try to solve this for myself.
Github