菜蜂 发表于 2018-1-3 18:00:46

SaltStack 常用模块介绍

`.  stateful
  The command being executed is expected to return data about executing
  a state
  umask
  The umask (in octal) to use when running the command.
  output_loglevel
  Control the loglevel at which the output from the command is logged.
  Note that the command being run will still be logged (loglevel: DEBUG)
  regardless, unless ``quiet`` is used for this value.
  quiet
  The command will be executed quietly, meaning no log entries of the
  actual command or its return data. This is deprecated as of the

  **2014.1.0**>  ``output_loglevel: quiet``.
  timeout
  If the command has not terminated after timeout seconds, send the
  subprocess sigterm, and if sigterm is ignored, follow up with sigkill
  creates
  Only run if the file specified by ``creates`` does not exist.
  New in version 2014.7.0
  use_vt
  Use VT utils (saltstack) to stream the command output more
  interactively to the console and the logs.
  This is experimental.
  Note:
  cmd.run supports the usage of ``reload_modules``. This functionality

  allows you to force Salt to>  ``reload_modules`` if your cmd.run does some sort of installation

  (such as ``pip``), if you do not>
  your state which>  getpip:
  cmd.run:
  - name: /usr/bin/python /usr/local/sbin/get-pip.py
  - unless: which pip
  - require:
  - pkg: python
  - file: /usr/local/sbin/get-pip.py

  ->  ES:
  test:
  cmd.run:

  - name: `which nginx` -s>  - onlyif: rpm -qa nginx
页: [1]
查看完整版本: SaltStack 常用模块介绍