Primary interface detection does not work

To make a long story short: In my case the best solution was to use the fact networking::primary to identify the primary interface and use the fact networking::interfaces::$NETWORKING::PRIMARY_VALUE::ip' to get the IP.