13432878738 发表于 2018-8-1 08:22:21

SaltStack源码分析之state模块

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!'}"
  
    '''
页: [1]
查看完整版本: SaltStack源码分析之state模块