salt-call.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. =============
  2. ``salt-call``
  3. =============
  4. Synopsis
  5. ========
  6. .. code-block:: bash
  7. salt-call [options]
  8. Description
  9. ===========
  10. The salt-call command is used to run module functions locally on a minion
  11. instead of executing them from the master. Salt-call is used to run a
  12. :ref:`Standalone Minion <tutorial-standalone-minion>`, and was originally
  13. created for :ref:`troubleshooting <troubleshooting-minion-salt-call>`.
  14. The Salt Master is contacted to retrieve state files and other resources
  15. during execution unless the ``--local`` option is specified.
  16. .. note::
  17. ``salt-call`` commands execute from the current user's shell
  18. context, while ``salt`` commands execute from the system's default context.
  19. Options
  20. =======
  21. .. program:: salt-call
  22. .. include:: _includes/common-options.rst
  23. .. option:: --hard-crash
  24. Raise any original exception rather than exiting gracefully Default: False
  25. .. option:: -g, --grains
  26. Return the information generated by the Salt grains
  27. .. option:: -m MODULE_DIRS, --module-dirs=MODULE_DIRS
  28. Specify an additional directory to pull modules from. Multiple directories
  29. can be provided by passing -m /--module-dirs multiple times.
  30. .. option:: -d, --doc, --documentation
  31. Return the documentation for the specified module or for all modules if
  32. none are specified
  33. .. option:: --master=MASTER
  34. Specify the master to use. The minion must be authenticated with the
  35. master. If this option is omitted, the master options from the minion
  36. config will be used. If multi masters are set up the first listed master
  37. that responds will be used.
  38. .. option:: --return RETURNER
  39. Set salt-call to pass the return data to one or many returner interfaces.
  40. To use many returner interfaces specify a comma delimited list of
  41. returners.
  42. .. option:: --local
  43. Run salt-call locally, as if there was no master running.
  44. .. option:: --file-root=FILE_ROOT
  45. Set this directory as the base file root.
  46. .. option:: --pillar-root=PILLAR_ROOT
  47. Set this directory as the base pillar root.
  48. .. option:: --retcode-passthrough
  49. Exit with the salt call retcode and not the salt binary retcode
  50. .. option:: --metadata
  51. Print out the execution metadata as well as the return. This will print out
  52. the outputter data, the return code, etc.
  53. .. option:: --id=ID
  54. Specify the minion id to use. If this option is omitted, the id option from
  55. the minion config will be used.
  56. .. option:: --skip-grains
  57. Do not load grains.
  58. .. option:: --refresh-grains-cache
  59. Force a refresh of the grains cache
  60. .. include:: _includes/logging-options.rst
  61. .. |logfile| replace:: /var/log/salt/minion
  62. .. |loglevel| replace:: ``warning``
  63. .. include:: _includes/output-options.rst
  64. See also
  65. ========
  66. :manpage:`salt(1)`
  67. :manpage:`salt-master(1)`
  68. :manpage:`salt-minion(1)`