The sys module provides information about the available functions on the minion
salt.modules.sysmod.
argspec
(module='')¶Return the argument specification of functions in Salt execution modules.
CLI 范例:
salt '*' sys.argspec pkg.install
salt '*' sys.argspec sys
salt '*' sys.argspec
Module names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.argspec 'pkg.*'
salt.modules.sysmod.
doc
(*args)¶Return the docstrings for all modules. Optionally, specify a module or a function to narrow the selection.
The strings are aggregated into a single document on the master for easy reading.
Multiple modules/functions can be specified.
CLI 范例:
salt '*' sys.doc
salt '*' sys.doc sys
salt '*' sys.doc sys.doc
salt '*' sys.doc network.traceroute user.info
Modules can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.doc 'sys.*'
salt '*' sys.doc 'sys.list_*'
salt.modules.sysmod.
list_functions
(*args, **kwargs)¶List the functions for all modules. Optionally, specify a module or modules from which to list.
CLI 范例:
salt '*' sys.list_functions
salt '*' sys.list_functions sys
salt '*' sys.list_functions sys user
Function names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.list_functions 'sys.list_*'
salt.modules.sysmod.
list_modules
(*args)¶List the modules loaded on the minion
2015.5.0 新版功能.
CLI 范例:
salt '*' sys.list_modules
Module names can be specified as globs.
salt '*' sys.list_modules 's*'
salt.modules.sysmod.
list_renderers
(*args)¶List the renderers loaded on the minion
2015.5.0 新版功能.
CLI 范例:
salt '*' sys.list_renderers
Render names can be specified as globs.
salt '*' sys.list_renderers 'yaml*'
salt.modules.sysmod.
list_returner_functions
(*args, **kwargs)¶List the functions for all returner modules. Optionally, specify a returner module or modules from which to list.
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.list_returner_functions
salt '*' sys.list_returner_functions mysql
salt '*' sys.list_returner_functions mysql etcd
Returner names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.list_returner_functions 'sqlite3.get_*'
salt.modules.sysmod.
list_returners
(*args)¶List the returners loaded on the minion
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.list_returners
Returner names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.list_returners 's*'
salt.modules.sysmod.
list_runner_functions
(*args, **kwargs)¶List the functions for all runner modules. Optionally, specify a runner module or modules from which to list.
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.list_runner_functions
salt '*' sys.list_runner_functions state
salt '*' sys.list_runner_functions state virt
Runner function names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.list_runner_functions 'state.*' 'virt.*'
salt.modules.sysmod.
list_runners
(*args)¶List the runners loaded on the minion
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.list_runners
Runner names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.list_runners 'm*'
salt.modules.sysmod.
list_state_functions
(*args, **kwargs)¶List the functions for all state modules. Optionally, specify a state module or modules from which to list.
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.list_state_functions
salt '*' sys.list_state_functions file
salt '*' sys.list_state_functions pkg user
State function names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.list_state_functions 'file.*'
salt '*' sys.list_state_functions 'file.s*'
salt.modules.sysmod.
list_state_modules
(*args)¶List the modules loaded on the minion
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.list_state_modules
State module names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.list_state_modules 'mysql_*'
salt.modules.sysmod.
reload_modules
()¶Tell the minion to reload the execution modules
CLI 范例:
salt '*' sys.reload_modules
salt.modules.sysmod.
renderer_doc
(*args)¶Return the docstrings for all renderers. Optionally, specify a renderer or a function to narrow the selection.
The strings are aggregated into a single document on the master for easy reading.
Multiple renderers can be specified.
2015.5.0 新版功能.
CLI 范例:
salt '*' sys.renderer_doc
salt '*' sys.renderer_doc cheetah
salt '*' sys.renderer_doc jinja json
Renderer names can be specified as globs.
salt '*' sys.renderer_doc 'c*' 'j*'
salt.modules.sysmod.
returner_argspec
(module='')¶Return the argument specification of functions in Salt returner modules.
2015.5.0 新版功能.
CLI 范例:
salt '*' sys.returner_argspec xmpp
salt '*' sys.returner_argspec xmpp smtp
salt '*' sys.returner_argspec
Returner names can be specified as globs.
salt '*' sys.returner_argspec 'sqlite3.*'
salt.modules.sysmod.
returner_doc
(*args)¶Return the docstrings for all returners. Optionally, specify a returner or a function to narrow the selection.
The strings are aggregated into a single document on the master for easy reading.
Multiple returners/functions can be specified.
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.returner_doc
salt '*' sys.returner_doc sqlite3
salt '*' sys.returner_doc sqlite3.get_fun
salt '*' sys.returner_doc sqlite3.get_fun etcd.get_fun
Returner names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.returner_doc 'sqlite3.get_*'
salt.modules.sysmod.
runner_argspec
(module='')¶Return the argument specification of functions in Salt runner modules.
2015.5.0 新版功能.
CLI 范例:
salt '*' sys.runner_argspec state
salt '*' sys.runner_argspec http
salt '*' sys.runner_argspec
Runner names can be specified as globs.
salt '*' sys.runner_argspec 'winrepo.*'
salt.modules.sysmod.
runner_doc
(*args)¶Return the docstrings for all runners. Optionally, specify a runner or a function to narrow the selection.
The strings are aggregated into a single document on the master for easy reading.
Multiple runners/functions can be specified.
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.runner_doc
salt '*' sys.runner_doc cache
salt '*' sys.runner_doc cache.grains
salt '*' sys.runner_doc cache.grains mine.get
Runner names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.runner_doc 'cache.clear_*'
salt.modules.sysmod.
state_argspec
(module='')¶Return the argument specification of functions in Salt state modules.
2015.5.0 新版功能.
CLI 范例:
salt '*' sys.state_argspec pkg.installed
salt '*' sys.state_argspec file
salt '*' sys.state_argspec
State names can be specified as globs.
salt '*' sys.state_argspec 'pkg.*'
salt.modules.sysmod.
state_doc
(*args)¶Return the docstrings for all states. Optionally, specify a state or a function to narrow the selection.
The strings are aggregated into a single document on the master for easy reading.
Multiple states/functions can be specified.
2014.7.0 新版功能.
CLI 范例:
salt '*' sys.state_doc
salt '*' sys.state_doc service
salt '*' sys.state_doc service.running
salt '*' sys.state_doc service.running ipables.append
State names can be specified as globs.
2015.5.0 新版功能.
salt '*' sys.state_doc 'service.*' 'iptables.*'
salt.modules.sysmod.
state_schema
(module='')¶Return a JSON Schema for the given state function(s)
2016.3.0 新版功能.
CLI 范例:
salt '*' sys.state_schema
salt '*' sys.state_schema pkg.installed