proxy.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. .. _configuration-salt-proxy:
  2. =================================
  3. Configuring the Salt Proxy Minion
  4. =================================
  5. The Salt system is amazingly simple and easy to configure. The two components
  6. of the Salt system each have a respective configuration file. The
  7. :command:`salt-master` is configured via the master configuration file, and the
  8. :command:`salt-proxy` is configured via the proxy configuration file.
  9. .. seealso::
  10. :ref:`example proxy minion configuration file <configuration-examples-proxy>`
  11. The Salt Minion configuration is very simple. Typically, the only value that
  12. needs to be set is the master value so the proxy knows where to locate its master.
  13. By default, the salt-proxy configuration will be in :file:`/etc/salt/proxy`.
  14. A notable exception is FreeBSD, where the configuration will be in
  15. :file:`/usr/local/etc/salt/proxy`.
  16. Proxy-specific Configuration Options
  17. ====================================
  18. .. conf_proxy:: add_proxymodule_to_opts
  19. ``add_proxymodule_to_opts``
  20. ---------------------------
  21. .. versionadded:: 2015.8.2
  22. .. versionchanged:: 2016.3.0
  23. Default: ``False``
  24. Add the proxymodule LazyLoader object to opts.
  25. .. code-block:: yaml
  26. add_proxymodule_to_opts: True
  27. .. conf_proxy:: proxy_merge_grains_in_module
  28. ``proxy_merge_grains_in_module``
  29. --------------------------------
  30. .. versionadded:: 2016.3.0
  31. .. versionchanged:: 2017.7.0
  32. Default: ``True``
  33. If a proxymodule has a function called ``grains``, then call it during
  34. regular grains loading and merge the results with the proxy's grains
  35. dictionary. Otherwise it is assumed that the module calls the grains
  36. function in a custom way and returns the data elsewhere.
  37. .. code-block:: yaml
  38. proxy_merge_grains_in_module: False
  39. .. conf_proxy:: proxy_keep_alive
  40. ``proxy_keep_alive``
  41. --------------------
  42. .. versionadded:: 2017.7.0
  43. Default: ``True``
  44. Whether the connection with the remote device should be restarted
  45. when dead. The proxy module must implement the ``alive`` function,
  46. otherwise the connection is considered alive.
  47. .. code-block:: yaml
  48. proxy_keep_alive: False
  49. .. conf_proxy:: proxy_keep_alive_interval
  50. ``proxy_keep_alive_interval``
  51. -----------------------------
  52. .. versionadded:: 2017.7.0
  53. Default: ``1``
  54. The frequency of keepalive checks, in minutes. It requires the
  55. :conf_proxy:`proxy_keep_alive` option to be enabled
  56. (and the proxy module to implement the ``alive`` function).
  57. .. code-block:: yaml
  58. proxy_keep_alive_interval: 5
  59. .. conf_proxy:: proxy_always_alive
  60. ``proxy_always_alive``
  61. ----------------------
  62. .. versionadded:: 2017.7.0
  63. Default: ``True``
  64. Whether the proxy should maintain the connection with the remote
  65. device. Similarly to :conf_proxy:`proxy_keep_alive`, this option
  66. is very specific to the design of the proxy module.
  67. When :conf_proxy:`proxy_always_alive` is set to ``False``,
  68. the connection with the remote device is not maintained and
  69. has to be closed after every command.
  70. .. code-block:: yaml
  71. proxy_always_alive: False
  72. ``proxy_merge_pillar_in_opts``
  73. ------------------------------
  74. .. versionadded:: 2017.7.3
  75. Default: ``False``.
  76. Whether the pillar data to be merged into the proxy configuration options.
  77. As multiple proxies can run on the same server, we may need different
  78. configuration options for each, while there's one single configuration file.
  79. The solution is merging the pillar data of each proxy minion into the opts.
  80. .. code-block:: yaml
  81. proxy_merge_pillar_in_opts: True
  82. ``proxy_deep_merge_pillar_in_opts``
  83. -----------------------------------
  84. .. versionadded:: 2017.7.3
  85. Default: ``False``.
  86. Deep merge of pillar data into configuration opts.
  87. This option is evaluated only when :conf_proxy:`proxy_merge_pillar_in_opts` is
  88. enabled.
  89. ``proxy_merge_pillar_in_opts_strategy``
  90. ---------------------------------------
  91. .. versionadded:: 2017.7.3
  92. Default: ``smart``.
  93. The strategy used when merging pillar configuration into opts.
  94. This option is evaluated only when :conf_proxy:`proxy_merge_pillar_in_opts` is
  95. enabled.
  96. ``proxy_mines_pillar``
  97. ----------------------
  98. .. versionadded:: 2017.7.3
  99. Default: ``True``.
  100. Allow enabling mine details using pillar data. This evaluates the mine
  101. configuration under the pillar, for the following regular minion options that
  102. are also equally available on the proxy minion: :conf_minion:`mine_interval`,
  103. and :conf_minion:`mine_functions`.