The machines I’m executing cf-agent on have multiple NICs online. I can’t trust $(sys.ipv4) to return the “correct” address.
I can use $(sys.ipv4[interface_name]) to find the correct address, but with Solaris using different names for the NIC based upon the driver, this becomes messy. I’ve been able to figure out the exact shell code that will find me the “real address” regardless of what NIC the machine is using: $ getent hosts $HOSTNAME | awk '{print $1}' I know you can use modules to execute shell scripts to define classes, but I haven’t seen any examples that uses modules to define global variables. Is this possible? Thanks! Mike
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine