# salt.states.module

## Execution of Salt modules from within states.

Individual module calls can be made via states. to call a single module function use the run function.

One issue exists, since the name and fun arguments are present in the state call data structure and is present in many modules, this argument will need to be replaced in the sls data with the arguments m_name and m_fun.

`salt.states.module.` `mod_watch`(name, **kwargs)

  Run a single module function

  `name`
    The module function to execute
  `returner`
    Specify the returner to send the return of the module execution to
  `**kwargs`
    Pass any arguments needed to execute the function

`salt.states.module.` `run`(name, **kwargs)

  Run a single module function

  `name`
    The module function to execute
  `returner`
    Specify the returner to send the return of the module execution to
  `**kwargs`
    Pass any arguments needed to execute the function

`salt.states.module.` `wait`(name, **kwargs)

  Run a single module function only if the watch statement calls it

  `name`
    The module function to execute
  `**kwargs`
    Pass any arguments needed to execute the function

  Note that this function actually does nothing -- however, if the watch is satisfied, then mod_watch (defined at the bottom of this file) will be run. In this case, mod_watch is an alias for run().

Current Salt release: 0.17.1

### Table Of Contents

- salt.states.module
  - Execution of Salt modules from within states.

#### Previous topic

salt.states.modjk_worker

#### Next topic

salt.states.mongodb_database

### Quick search

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

### Upcoming SaltStack Events

My conferences on Lanyrd