Control aspects of the grains data
Return a single component of the grains data
CLI Example:
salt '*' grains.item os
Return multiple components of the grains data
CLI Example:
salt '*' grains.item os osrelease oscodename
Sanitized CLI Example:
salt '*' grains.item host sanitize=True
Return the grains data
CLI Example:
salt '*' grains.items
Sanitized CLI output:
salt '*' grains.items sanitize=True
Return a list of all available grains
CLI Example:
salt '*' grains.ls
Set a grains value in the grains config file
CLI Example:
salt '*' grains.setval key val