# salt.states.saltmod

The Salt state is used to control the salt command interface. This state is intended for use primarily from the state runner from the master.

The salt.state declaration can call out a highstate or a list of sls:

> webservers:
>   salt.state:
>     - tgt: 'web*'
>     - sls: - apache - django - core
>     - env: prod
> databasees:
>   salt.state:
>     - tgt: role:database
>     - tgt_type: grain
>     - highstate: True

`salt.states.saltmod.` `function`(name, tgt, ssh=False, tgt_type=None, ret='', arg=(), **kwargs)

  Execute a single module function on a remote minion via salt or salt-ssh

  name
    The name of the function to run, aka cmd.run or pkg.install
  tgt
    The target specification, aka '*' for all minions
  tgt_type | expr_form
    The target type, defaults to glob
  arg
    The list of arguments to pass into the function
  ret
    Optionally set a single or a list of returners to use
  ssh
    Set to True to use the ssh client instaed of the standard salt client

`salt.states.saltmod.` `state`(name, tgt, ssh=False, tgt_type=None, ret='', highstate=None, sls=None, env=None, test=False, fail_minions='', allow_fail=0, **kwargs)

  Invoke a state run on a given target

  name
    An arbitrary name used to track the state execution
  tgt
    The target specification for the state run.
  tgt_type | expr_form
    The target type to resolve, defaults to glob
  ret
    Optionally set a single or a list of returners to use
  highstate
    Defaults to None, if set to True the target systems will ignore any sls references specified in the sls option and call state.highstate on the targeted minions
  sls
    A group of sls files to execute. This can be defined as a single string containing a single sls file, or a list of sls files
  env
    The default environment to pull sls files from
  ssh
    Set to True to use the ssh client instaed of the standard salt client
  roster
    In the event of using salt-ssh, a roster system can be set
  fail_minions
    An optional list of targeted minions where failure is an option

Current Salt release: 0.17.1

#### Previous topic

salt.states.rvm

#### Next topic

salt.states.selinux

### Quick search

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

### Upcoming SaltStack Events

My conferences on Lanyrd