The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are loaded, grain functions are detected and executed, the functions MUST return a dict which will be applied to the main grains dict. This module will always be executed first, so that any grains loaded here in the core module can be overwritten just by returning dict keys with the same value as those returned here
salt.grains.core.
get_master
()Provides the minion with the name of its master. This is useful in states to target other services running on the master.
salt.grains.core.
get_server_id
()Provides an integer based on the FQDN of a machine. Useful as server-id in MySQL replication or anywhere else you'll need an ID like this.
salt.grains.core.
hwaddr_interfaces
()Provide a dict of the connected interfaces and their hw addresses (Mac Address)
salt.grains.core.
ip4_interfaces
()Provide a dict of the connected interfaces and their ip4 addresses The addresses will be passed as a list for each interface
salt.grains.core.
ip6_interfaces
()Provide a dict of the connected interfaces and their ip6 addresses The addresses will be passed as a list for each interface