diff --git a/salt/states/grains.py b/salt/states/grains.py index c35f6c3e3b..cbdc866b98 100644 --- a/salt/states/grains.py +++ b/salt/states/grains.py @@ -1,5 +1,20 @@ ''' -Manage grains on the minion. This state allows for grains to be set and unset +Manage grains on the minion. +============================ + +This state allows for grains to be set. If a grain with the +given name exists, its value is updated to the new value. If +a grain does not yet exist, a new grain is set to the given +value. Grains set or altered this way are stored in the 'grains' +file on the minions, by default at: /etc/salt/grains + +Note: This does NOT override any grains set in the minion file. + +.. code-block:: yaml + + cheese: + grain.present: + - value: edam ''' def present(name, value):