salt.grains.core

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.append_domain()

Return append_domain if set

salt.grains.core.dns()

Parse the resolver configuration file

2016.3.0 新版功能.

salt.grains.core.fqdn_ip4()

Return a list of ipv4 addrs of fqdn

salt.grains.core.fqdn_ip6()

Return a list of ipv6 addrs of fqdn

salt.grains.core.get_machine_id()

Provide the machine-id

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.hostname()

Return fqdn, hostname, domainname

salt.grains.core.hwaddr_interfaces()

Provide a dict of the connected interfaces and their hw addresses (Mac Address)

salt.grains.core.id_()

Return the id

salt.grains.core.ip4()

Return a list of ipv4 addrs

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()

Return a list of ipv6 addrs

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

salt.grains.core.ip_interfaces()

Provide a dict of the connected interfaces and their ip addresses The addresses will be passed as a list for each interface

salt.grains.core.locale_info()
Provides
defaultlanguage defaultencoding
salt.grains.core.os_data()

Return grains pertaining to the operating system

salt.grains.core.path()

Return the path

salt.grains.core.pythonexecutable()

Return the python executable in use

salt.grains.core.pythonpath()

Return the Python path

salt.grains.core.pythonversion()

Return the Python version

salt.grains.core.saltpath()

Return the path of the salt module

salt.grains.core.saltversion()

Return the version of salt

salt.grains.core.saltversioninfo()

Return the version_info of salt

0.17.0 新版功能.

salt.grains.core.zmqversion()

Return the zeromq version