# salt.states.grains

## 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.

    cheese:
      grains.present:
        - value: edam

`salt.states.grains.` `present`(name, value)

  Ensure that a grain is set

  name
    The grain name
  value
    The value to set on the grain

Current Salt release: 0.17.1

### Table Of Contents

- salt.states.grains
  - Manage grains on the minion.

#### Previous topic

salt.states.git

#### Next topic

salt.states.group

### Quick search

Enter search terms or a module, class or function name.

### Upcoming SaltStack Events

My conferences on Lanyrd