salt-ssh
¶salt-ssh '*' [ options ] sys.doc
salt-ssh -E '.*' [ options ] sys.doc cmd
Salt SSH allows for salt routines to be executed using only SSH for transport
-r
,
--raw
,
--raw-shell
¶Execute a raw shell command.
--priv
¶Specify the SSH private key file to be used for authentication.
--roster
¶Define which roster system to use, this defines if a database backend, scanner, or custom roster system is used. Default is the flat file roster.
--roster-file
¶Define an alternative location for the default roster file location. The
default roster file is called roster
and is found in the same directory
as the master config file.
2014.1.0 新版功能.
--refresh
,
--refresh-cache
¶Force a refresh of the master side data cache of the target's data. This is needed if a target's grains have been changed and the auto refresh timeframe has not been reached.
--max-procs
¶Set the number of concurrent minions to communicate with. This value defines how many processes are opened up at a time to manage connections, the more running process the faster communication should be, default is 25.
-i
,
--ignore-host-keys
¶Disables StrictHostKeyChecking to relax acceptance of new and unknown host keys.
--no-host-keys
¶Fully ignores ssh host keys which by default are honored and connections would ask for approval. Useful if the host key of a remote server has changed and would still error with --ignore-host-keys.
--passwd
¶Set the default password to attempt to use when authenticating.
--key-deploy
¶Set this flag to attempt to deploy the authorized ssh key with all minions. This combined with --passwd can make initial deployment of keys very fast and easy.
--version
¶输出运行中的Salt版本
--versions-report
¶输出程序依赖者和版本号,然后退出
-h
,
--help
¶显示帮助信息然后退出
-c
CONFIG_DIR
,
--config-dir
=CONFIG_dir
¶Salt配置目录的位置。这个目录包含了Salt Master和Minion的配置文件。在大多数系统中,默认位置是``/etc/salt``。
-E
,
--pcre
¶目标表达式会当作PCRE正则表达式而不是一个shell 通配符
-L
,
--list
¶目标表达式被解析为用逗号分隔开的列表;例如:server1.foo.bar,server2.foo.bar,example7.quo.qux
-G
,
--grain
¶目标表达式匹配值返回minion的Salt grains系统。目标表达式是这样格式'<grain value>:<glob expression>'; 比如:'os:Arch*'
这个会在0.9.8版本中被改变为接受glob表达式替代正则表达式。要使用正则表达式匹配grains,使用--grain-pcre选项。
--grain-pcre
¶minion上的Salt grains系统返回的目标表达式匹配值。目标匹配值是像这样的格式 '<grain value>:< regular expression>';;例如: 'os:Arch.*'
-N
,
--nodegroup
¶使用在Salt master配置文件中定义的预定义复合目标。
-R
,
--range
¶另一种替代用shell通配符来匹配目标的方式,是使用一个范围表达式来确定目标。范围表达式看起来像%cluster。
使用范围选项需要一个建立一个范围服务器,而且要在Master的配置文件中指定范围服务器的位置。
日志选项会覆盖在配置文件中定义的任何设置。
-l
LOG_LEVEL
,
--log-level
=LOG_LEVEL
¶控制台日志级别。是``all``, garbage
, trace
, debug
, info
, warning
, error
, ``quiet``的其中一个。默认|loglevel|.
--log-file
=LOG_FILE
¶日志文件路径。默认|logfile|.
--out
¶Pass in an alternative outputter to display the return of data. This outputter can be any of the available outputters:
grains
,highstate
,json
,key
,overstatestage
,pprint
,raw
,txt
,yaml
Some outputters are formatted only for data returned from specific
functions; for instance, the grains
outputter will not work for non-grains
data.
If an outputter is used that does not support the data passed into it, then
Salt will fall back on the pprint
outputter and display the return data
using the Python pprint
standard library module.
注解
If using --out=json
, you will probably want --static
as well.
Without the static option, you will get a separate JSON string per minion
which makes JSON output invalid as a whole.
This is due to using an iterative outputter. So if you want to feed it
to a JSON parser, use --static
as well.
--out-indent
OUTPUT_INDENT
,
--output-indent
OUTPUT_INDENT
¶Print the output indented by the provided value in spaces. Negative values disable indentation. Only applicable in outputters that support indentation.
--out-file
=OUTPUT_FILE
,
--output-file
=OUTPUT_FILE
¶把输出写到指定的文件。
--no-color
¶禁用所有的彩色输出
--force-color
¶强制彩色输出
注解
When using colored output the color codes are as follows:
green
denotes success, red
denotes failure, blue
denotes
changes and success and yellow
denotes a expected future change in configuration.
salt(7) salt-master(1) salt-minion(1)