LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

salt-call

Run Salt modules locally on a minion

TLDR

Run state locally
$ salt-call state.apply
copy
Run specific state
$ salt-call state.apply [apache]
copy
Execute module function
$ salt-call cmd.run 'uname -a'
copy
Run in local mode
$ salt-call --local grains.items
copy
Test mode (dry run without making changes)
$ salt-call state.apply test=True
copy
Show output in JSON format
$ salt-call --output json grains.items
copy
Run with debug logging
$ salt-call --log-level=debug state.apply
copy

SYNOPSIS

salt-call [options] function [arguments...]

DESCRIPTION

salt-call runs Salt execution modules and states directly on a minion without going through the Salt master. This is useful for testing, debugging, and masterless Salt configurations where the minion applies states independently.When used with --local, it operates completely independently of a master, making it ideal for standalone configuration management or testing states before deploying them across infrastructure.

PARAMETERS

--local

Run without connecting to a Salt master. Uses local file client.
--grains
Return minion grain data.
--pillar data
Set pillar data as a dictionary (e.g., '{"key": "value"}').
--output format
Output format: json, yaml, nested, raw, highstate, quiet, etc.
--state-output mode
State output verbosity: full, terse, mixed, changes.
--log-level level
Log level: all, garbage, trace, debug, info, warning, error, critical, quiet.
--id MINIONID_
Specify the minion ID (overrides the configured minion ID).
--retcode-passthrough
Exit with the Salt command return code, useful for scripting.
--no-color
Disable colored output.

SEE ALSO

Copied to clipboard
Kai