了解某个某块的一些用法:
# salt soa.prod.zookeeper-010177210114.sl sys.list_functions pillar
soa.prod.zookeeper-010177210114.sl:
- pillar.data
- pillar.ext
- pillar.fetch
- pillar.file_exists
- pillar.get
- pillar.item
- pillar.items
- pillar.keys
- pillar.ls
- pillar.obfuscate
- pillar.raw
# salt soa.prod.zookeeper-010177210114.sl sys.list_functions grains
soa.prod.zookeeper-010177210114.sl:
- grains.append
- grains.delval
- grains.fetch
- grains.filter_by
- grains.get
- grains.get_or_set_hash
- grains.has_value
- grains.item
- grains.items
- grains.ls
- grains.remove
- grains.set
- grains.setval
- grains.setvals
查看模块用法:
# salt soa.prod.zookeeper-010177210114.sl sys.doc pillar
pillar.data:
This function is an alias of ``items``.
Calls the master for a fresh pillar and generates the pillar data on the
fly
Contrast with :py:func:`raw` which returns the pillar data that is
currently loaded into the minion.
pillar
if specified, allows for a dictionary of pillar data to be made
available to pillar and ext_pillar rendering. these pillar variables
will also override any variables of the same name in pillar or
ext_pillar.
New in version 2015.5.0
pillarenv
Pass a specific pillar environment from which to compile pillar data.
If not specified, then the minion's :conf_minion:`pillarenv` option is
not used, and if that also is not specified then all configured pillar
environments will be merged into a single pillar dictionary and
returned.
New in version 2016.11.2
CLI Example:
salt '*' pillar.items
.....
增加grains信息:
多组grains信息
salt soa.prod.zookeeper-010177210114.sl grains.setvarls "{'salt':'good','book':'cool'}"
单组grains信息
salt soa.prod.zookeeper-010177210114.sl grains.setvarls saltbook 'socool'
查看所有module列表:
# salt soa.prod.zookeeper-010177210114.sl sys.list_modules
soa.prod.zookeeper-010177210114.sl:
- acl
- aliases
- alternatives
- apache
- archive
- artifactory
- beacons
- bigip
- blockdev
- btrfs
.....
查看cmd modules 所有的function的使用方法:
salt soa.prod.zookeeper-010177210114.sl sys.list_functions cmd
查看modules的使用方法:
salt soa.prod.zookeeper-010177210114.sl sys.doc cmd
网友评论