SaltStack源码分析之state模块
2015-05-14 15:06
225 查看
state模块用于控制minion端的状态系统
/usr/lib/python2.6/site-packages/salt/modules/state.py
本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1651252
/usr/lib/python2.6/site-packages/salt/modules/state.py
def highstate(test=None, queue=False, **kwargs): ''' Retrieve the state data from the salt master for this minion and execute it test Notify states to execute in test-only (dry-run) mode. Sets the ``test`` variable in the minion ``opts`` for the duration of the state run. pillar Custom Pillar data can be passed with the ``pillar`` kwarg. Values passed here will override hard-coded Pillar values. queue : ``False`` Instead of failing immediately when another state run is in progress, queue the new state run to begin running once the other has finished. This option starts a new thread for each queued state run so use this option sparingly. localconfig: Instead of using running minion opts, load ``localconfig`` and merge that with the running minion opts. This functionality is intended for using "roots" of salt directories (with their own minion config, pillars, file_roots) to run highstate out of. CLI Example: .. code-block:: bash salt '*' state.highstate salt '*' state.highstate whitelist=sls1_to_run,sls2_to_run salt '*' state.highstate exclude=sls_to_exclude salt '*' state.highstate exclude="[{'id': 'id_to_exclude'}, {'sls': 'sls_to_exclude'}]" salt '*' state.highstate pillar="{foo: 'Foo!', bar: 'Bar!'}" '''
本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1651252
相关文章推荐
- SaltStack源码分析之cmdmod模块
- SaltStack源码分析之Redis Returner
- SaltStack源码分析之使用MongoDB模块
- SaltStack源码分析之saltutil模块
- SaltStack源码分析之file状态模块
- SaltStack源码分析之使用Redis模块
- SaltStack源码分析之user状态模块
- SaltStack源码分析之pkg状态模块
- SaltStack源码分析之使用logrotate模块
- SaltStack源码分析之:master端执行salt模块大致流程
- saltstack之(九)配置管理源码部署Nginx
- 源码解读Saltstack运行机制之Job Runtime
- Java Collections Framework之Stack源码分析缺陷,栈改进版(通过LinkedList实现)(基于JDK1.6)
- 运维自动化之ansible saltstack使用对比分析
- salt-ssh源码分析
- JDK Collections Framework之Stack源码分析
- SaltStack runners模块分析之cache模块
- salt-key源码分析
- saltstack之virt模块创建虚拟机分析之二
- java 中的集合(七) Stack源码分析