1
0

minion.rst 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588
  1. .. _configuration-salt-minion:
  2. ===========================
  3. Configuring the Salt 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-minion` is configured via the minion configuration file.
  9. .. seealso::
  10. :ref:`example minion configuration file <configuration-examples-minion>`
  11. The Salt Minion configuration is very simple. Typically, the only value that
  12. needs to be set is the master value so the minion knows where to locate its master.
  13. By default, the salt-minion configuration will be in :file:`/etc/salt/minion`.
  14. A notable exception is FreeBSD, where the configuration will be in
  15. :file:`/usr/local/etc/salt/minion`.
  16. Minion Primary Configuration
  17. ============================
  18. .. conf_minion:: master
  19. ``master``
  20. ----------
  21. Default: ``salt``
  22. The hostname or IP address of the master. See :conf_minion:`ipv6` for IPv6
  23. connections to the master.
  24. Default: ``salt``
  25. .. code-block:: yaml
  26. master: salt
  27. master:port Syntax
  28. ~~~~~~~~~~~~~~~~~~
  29. .. versionadded:: 2015.8.0
  30. The ``master`` config option can also be set to use the master's IP in
  31. conjunction with a port number by default.
  32. .. code-block:: yaml
  33. master: localhost:1234
  34. For IPv6 formatting with a port, remember to add brackets around the IP address
  35. before adding the port and enclose the line in single quotes to make it a string:
  36. .. code-block:: yaml
  37. master: '[2001:db8:85a3:8d3:1319:8a2e:370:7348]:1234'
  38. .. note::
  39. If a port is specified in the ``master`` as well as :conf_minion:`master_port`,
  40. the ``master_port`` setting will be overridden by the ``master`` configuration.
  41. List of Masters Syntax
  42. ~~~~~~~~~~~~~~~~~~~~~~
  43. The option can also be set to a list of masters, enabling
  44. :ref:`multi-master <tutorial-multi-master>` mode.
  45. .. code-block:: yaml
  46. master:
  47. - address1
  48. - address2
  49. .. versionchanged:: 2014.7.0
  50. The master can be dynamically configured. The :conf_minion:`master` value
  51. can be set to an module function which will be executed and will assume
  52. that the returning value is the ip or hostname of the desired master. If a
  53. function is being specified, then the :conf_minion:`master_type` option
  54. must be set to ``func``, to tell the minion that the value is a function to
  55. be run and not a fully-qualified domain name.
  56. .. code-block:: yaml
  57. master: module.function
  58. master_type: func
  59. In addition, instead of using multi-master mode, the minion can be
  60. configured to use the list of master addresses as a failover list, trying
  61. the first address, then the second, etc. until the minion successfully
  62. connects. To enable this behavior, set :conf_minion:`master_type` to
  63. ``failover``:
  64. .. code-block:: yaml
  65. master:
  66. - address1
  67. - address2
  68. master_type: failover
  69. .. conf_minion:: ipv6
  70. ``ipv6``
  71. --------
  72. Default: ``None``
  73. Whether the master should be connected over IPv6. By default salt minion
  74. will try to automatically detect IPv6 connectivity to master.
  75. .. code-block:: yaml
  76. ipv6: True
  77. .. conf_minion:: master_uri_format
  78. ``master_uri_format``
  79. ---------------------
  80. .. versionadded:: 2015.8.0
  81. Specify the format in which the master address will be evaluated. Valid options
  82. are ``default`` or ``ip_only``. If ``ip_only`` is specified, then the master
  83. address will not be split into IP and PORT, so be sure that only an IP (or domain
  84. name) is set in the :conf_minion:`master` configuration setting.
  85. .. code-block:: yaml
  86. master_uri_format: ip_only
  87. .. conf_minion:: master_tops_first
  88. ``master_tops_first``
  89. ---------------------
  90. .. versionadded:: 2018.3.0
  91. Default: ``False``
  92. SLS targets defined using the :ref:`Master Tops <master-tops-system>` system
  93. are normally executed *after* any matches defined in the :ref:`Top File
  94. <states-top>`. Set this option to ``True`` to have the minion execute the
  95. :ref:`Master Tops <master-tops-system>` states first.
  96. .. code-block:: yaml
  97. master_tops_first: True
  98. .. conf_minion:: master_type
  99. ``master_type``
  100. ---------------
  101. .. versionadded:: 2014.7.0
  102. Default: ``str``
  103. The type of the :conf_minion:`master` variable. Can be ``str``, ``failover``,
  104. ``func`` or ``disable``.
  105. .. code-block:: yaml
  106. master_type: failover
  107. If this option is set to ``failover``, :conf_minion:`master` must be a list of
  108. master addresses. The minion will then try each master in the order specified
  109. in the list until it successfully connects. :conf_minion:`master_alive_interval`
  110. must also be set, this determines how often the minion will verify the presence
  111. of the master.
  112. .. code-block:: yaml
  113. master_type: func
  114. If the master needs to be dynamically assigned by executing a function instead
  115. of reading in the static master value, set this to ``func``. This can be used
  116. to manage the minion's master setting from an execution module. By simply
  117. changing the algorithm in the module to return a new master ip/fqdn, restart
  118. the minion and it will connect to the new master.
  119. As of version 2016.11.0 this option can be set to ``disable`` and the minion
  120. will never attempt to talk to the master. This is useful for running a
  121. masterless minion daemon.
  122. .. code-block:: yaml
  123. master_type: disable
  124. .. conf_minion:: max_event_size
  125. ``max_event_size``
  126. ------------------
  127. .. versionadded:: 2014.7.0
  128. Default: ``1048576``
  129. Passing very large events can cause the minion to consume large amounts of
  130. memory. This value tunes the maximum size of a message allowed onto the
  131. minion event bus. The value is expressed in bytes.
  132. .. code-block:: yaml
  133. max_event_size: 1048576
  134. .. conf_minion:: enable_legacy_startup_events
  135. ``enable_legacy_startup_events``
  136. --------------------------------
  137. .. versionadded:: 2019.2.0
  138. Default: ``True``
  139. When a minion starts up it sends a notification on the event bus with a tag
  140. that looks like this: ``salt/minion/<minion_id>/start``. For historical reasons
  141. the minion also sends a similar event with an event tag like this:
  142. ``minion_start``. This duplication can cause a lot of clutter on the event bus
  143. when there are many minions. Set ``enable_legacy_startup_events: False`` in the
  144. minion config to ensure only the ``salt/minion/<minion_id>/start`` events are
  145. sent. Beginning with the ``Sodium`` Salt release this option will default to
  146. ``False``.
  147. .. code-block:: yaml
  148. enable_legacy_startup_events: True
  149. .. conf_minion:: master_failback
  150. ``master_failback``
  151. -------------------
  152. .. versionadded:: 2016.3.0
  153. Default: ``False``
  154. If the minion is in multi-master mode and the :conf_minion`master_type`
  155. configuration option is set to ``failover``, this setting can be set to ``True``
  156. to force the minion to fail back to the first master in the list if the first
  157. master is back online.
  158. .. code-block:: yaml
  159. master_failback: False
  160. .. conf_minion:: master_failback_interval
  161. ``master_failback_interval``
  162. ----------------------------
  163. .. versionadded:: 2016.3.0
  164. Default: ``0``
  165. If the minion is in multi-master mode, the :conf_minion`master_type` configuration
  166. is set to ``failover``, and the ``master_failback`` option is enabled, the master
  167. failback interval can be set to ping the top master with this interval, in seconds.
  168. .. code-block:: yaml
  169. master_failback_interval: 0
  170. .. conf_minion:: master_alive_interval
  171. ``master_alive_interval``
  172. -------------------------
  173. Default: ``0``
  174. Configures how often, in seconds, the minion will verify that the current
  175. master is alive and responding. The minion will try to establish a connection
  176. to the next master in the list if it finds the existing one is dead.
  177. .. code-block:: yaml
  178. master_alive_interval: 30
  179. .. conf_minion:: master_shuffle
  180. ``master_shuffle``
  181. ------------------
  182. .. versionadded:: 2014.7.0
  183. .. deprecated:: 2019.2.0
  184. Default: ``False``
  185. .. warning::
  186. This option has been deprecated in Salt ``2019.2.0``. Please use
  187. :conf_minion:`random_master` instead.
  188. .. code-block:: yaml
  189. master_shuffle: True
  190. .. conf_minion:: random_master
  191. ``random_master``
  192. -----------------
  193. .. versionadded:: 2014.7.0
  194. .. versionchanged:: 2019.2.0
  195. The :conf_minion:`master_failback` option can be used in conjunction with
  196. ``random_master`` to force the minion to fail back to the first master in the
  197. list if the first master is back online. Note that :conf_minion:`master_type`
  198. must be set to ``failover`` in order for the ``master_failback`` setting to
  199. work.
  200. Default: ``False``
  201. If :conf_minion:`master` is a list of addresses, shuffle them before trying to
  202. connect to distribute the minions over all available masters. This uses Python's
  203. :func:`random.shuffle <python2:random.shuffle>` method.
  204. If multiple masters are specified in the 'master' setting as a list, the default
  205. behavior is to always try to connect to them in the order they are listed. If
  206. ``random_master`` is set to True, the order will be randomized instead upon Minion
  207. startup. This can be helpful in distributing the load of many minions executing
  208. ``salt-call`` requests, for example, from a cron job. If only one master is listed,
  209. this setting is ignored and a warning is logged.
  210. .. code-block:: yaml
  211. random_master: True
  212. .. note::
  213. When the ``failover``, ``master_failback``, and ``random_master`` options are
  214. used together, only the "secondary masters" will be shuffled. The first master
  215. in the list is ignored in the :func:`random.shuffle <python2:random.shuffle>`
  216. call. See :conf_minion:`master_failback` for more information.
  217. .. conf_minion:: retry_dns
  218. ``retry_dns``
  219. -------------
  220. Default: ``30``
  221. Set the number of seconds to wait before attempting to resolve
  222. the master hostname if name resolution fails. Defaults to 30 seconds.
  223. Set to zero if the minion should shutdown and not retry.
  224. .. code-block:: yaml
  225. retry_dns: 30
  226. .. conf_minion:: retry_dns_count
  227. ``retry_dns_count``
  228. -------------------
  229. .. versionadded:: 2018.3.4
  230. Default: ``None``
  231. Set the number of attempts to perform when resolving
  232. the master hostname if name resolution fails.
  233. By default the minion will retry indefinitely.
  234. .. code-block:: yaml
  235. retry_dns_count: 3
  236. .. conf_minion:: master_port
  237. ``master_port``
  238. ---------------
  239. Default: ``4506``
  240. The port of the master ret server, this needs to coincide with the ret_port
  241. option on the Salt master.
  242. .. code-block:: yaml
  243. master_port: 4506
  244. .. conf_minion:: publish_port
  245. ``publish_port``
  246. ----------------
  247. Default: ``4505``
  248. The port of the master publish server, this needs to coincide with the publish_port
  249. option on the Salt master.
  250. .. code-block:: yaml
  251. publish_port: 4505
  252. .. conf_minion:: source_interface_name
  253. ``source_interface_name``
  254. -------------------------
  255. .. versionadded:: 2018.3.0
  256. The name of the interface to use when establishing the connection to the Master.
  257. .. note::
  258. If multiple IP addresses are configured on the named interface,
  259. the first one will be selected. In that case, for a better selection,
  260. consider using the :conf_minion:`source_address` option.
  261. .. note::
  262. To use an IPv6 address from the named interface, make sure the option
  263. :conf_minion:`ipv6` is enabled, i.e., ``ipv6: true``.
  264. .. note::
  265. If the interface is down, it will avoid using it, and the Minion
  266. will bind to ``0.0.0.0`` (all interfaces).
  267. .. warning::
  268. This option requires modern version of the underlying libraries used by
  269. the selected transport:
  270. - ``zeromq`` requires ``pyzmq`` >= 16.0.1 and ``libzmq`` >= 4.1.6
  271. - ``tcp`` requires ``tornado`` >= 4.5
  272. Configuration example:
  273. .. code-block:: yaml
  274. source_interface_name: bond0.1234
  275. .. conf_minion:: source_address
  276. ``source_address``
  277. ------------------
  278. .. versionadded:: 2018.3.0
  279. The source IP address or the domain name to be used when connecting the Minion
  280. to the Master.
  281. See :conf_minion:`ipv6` for IPv6 connections to the Master.
  282. .. warning::
  283. This option requires modern version of the underlying libraries used by
  284. the selected transport:
  285. - ``zeromq`` requires ``pyzmq`` >= 16.0.1 and ``libzmq`` >= 4.1.6
  286. - ``tcp`` requires ``tornado`` >= 4.5
  287. Configuration example:
  288. .. code-block:: yaml
  289. source_address: if-bond0-1234.sjc.us-west.internal
  290. .. conf_minion:: source_ret_port
  291. ``source_ret_port``
  292. -------------------
  293. .. versionadded:: 2018.3.0
  294. The source port to be used when connecting the Minion to the Master ret server.
  295. .. warning::
  296. This option requires modern version of the underlying libraries used by
  297. the selected transport:
  298. - ``zeromq`` requires ``pyzmq`` >= 16.0.1 and ``libzmq`` >= 4.1.6
  299. - ``tcp`` requires ``tornado`` >= 4.5
  300. Configuration example:
  301. .. code-block:: yaml
  302. source_ret_port: 49017
  303. .. conf_minion:: source_publish_port
  304. ``source_publish_port``
  305. -----------------------
  306. .. versionadded:: 2018.3.0
  307. The source port to be used when connecting the Minion to the Master publish
  308. server.
  309. .. warning::
  310. This option requires modern version of the underlying libraries used by
  311. the selected transport:
  312. - ``zeromq`` requires ``pyzmq`` >= 16.0.1 and ``libzmq`` >= 4.1.6
  313. - ``tcp`` requires ``tornado`` >= 4.5
  314. Configuration example:
  315. .. code-block:: yaml
  316. source_publish_port: 49018
  317. .. conf_minion:: user
  318. ``user``
  319. --------
  320. Default: ``root``
  321. The user to run the Salt processes
  322. .. code-block:: yaml
  323. user: root
  324. .. conf_minion:: sudo_user
  325. ``sudo_user``
  326. -------------
  327. Default: ``''``
  328. The user to run salt remote execution commands as via sudo. If this option is
  329. enabled then sudo will be used to change the active user executing the remote
  330. command. If enabled the user will need to be allowed access via the sudoers file
  331. for the user that the salt minion is configured to run as. The most common
  332. option would be to use the root user. If this option is set the ``user`` option
  333. should also be set to a non-root user. If migrating from a root minion to a non
  334. root minion the minion cache should be cleared and the minion pki directory will
  335. need to be changed to the ownership of the new user.
  336. .. code-block:: yaml
  337. sudo_user: root
  338. ``pidfile``
  339. -----------
  340. Default: ``/var/run/salt-minion.pid``
  341. The location of the daemon's process ID file
  342. .. code-block:: yaml
  343. pidfile: /var/run/salt-minion.pid
  344. .. conf_minion:: root_dir
  345. ``root_dir``
  346. ------------
  347. Default: ``/``
  348. This directory is prepended to the following options: :conf_minion:`pki_dir`,
  349. :conf_minion:`cachedir`, :conf_minion:`log_file`, :conf_minion:`sock_dir`, and
  350. :conf_minion:`pidfile`.
  351. .. code-block:: yaml
  352. root_dir: /
  353. .. conf_minion:: conf_file
  354. ``conf_file``
  355. -------------
  356. Default: ``/etc/salt/minion``
  357. The path to the minion's configuration file.
  358. .. code-block:: yaml
  359. conf_file: /etc/salt/minion
  360. .. conf_minion:: pki_dir
  361. ``pki_dir``
  362. -----------
  363. Default: ``/etc/salt/pki/minion``
  364. The directory used to store the minion's public and private keys.
  365. .. code-block:: yaml
  366. pki_dir: /etc/salt/pki/minion
  367. .. conf_minion:: id
  368. ``id``
  369. ------
  370. Default: the system's hostname
  371. .. seealso:: :ref:`Salt Walkthrough <minion-id-generation>`
  372. The :strong:`Setting up a Salt Minion` section contains detailed
  373. information on how the hostname is determined.
  374. Explicitly declare the id for this minion to use. Since Salt uses detached ids
  375. it is possible to run multiple minions on the same machine but with different
  376. ids.
  377. .. code-block:: yaml
  378. id: foo.bar.com
  379. .. conf_minion:: minion_id_caching
  380. ``minion_id_caching``
  381. ---------------------
  382. .. versionadded:: 0.17.2
  383. Default: ``True``
  384. Caches the minion id to a file when the minion's :conf_minion:`id` is not
  385. statically defined in the minion config. This setting prevents potential
  386. problems when automatic minion id resolution changes, which can cause the
  387. minion to lose connection with the master. To turn off minion id caching,
  388. set this config to ``False``.
  389. For more information, please see `Issue #7558`_ and `Pull Request #8488`_.
  390. .. code-block:: yaml
  391. minion_id_caching: True
  392. .. _Issue #7558: https://github.com/saltstack/salt/issues/7558
  393. .. _Pull Request #8488: https://github.com/saltstack/salt/pull/8488
  394. .. conf_minion:: append_domain
  395. ``append_domain``
  396. -----------------
  397. Default: ``None``
  398. Append a domain to a hostname in the event that it does not exist. This is
  399. useful for systems where ``socket.getfqdn()`` does not actually result in a
  400. FQDN (for instance, Solaris).
  401. .. code-block:: yaml
  402. append_domain: foo.org
  403. .. conf_minion:: minion_id_remove_domain
  404. ``minion_id_remove_domain``
  405. ---------------------------
  406. .. versionadded:: 3000
  407. Default: ``False``
  408. Remove a domain when the minion id is generated as a fully qualified domain
  409. name (either by the user provided ``id_function``, or by Salt). This is useful
  410. when the minions shall be named like hostnames. Can be a single domain (to
  411. prevent name clashes), or True, to remove all domains.
  412. Examples:
  413. - minion_id_remove_domain = foo.org
  414. - FQDN = king_bob.foo.org --> minion_id = king_bob
  415. - FQDN = king_bob.bar.org --> minion_id = king_bob.bar.org
  416. - minion_id_remove_domain = True
  417. - FQDN = king_bob.foo.org --> minion_id = king_bob
  418. - FQDN = king_bob.bar.org --> minion_id = king_bob
  419. For more information, please see :issue:`49212` and :pull:`49378`.
  420. .. code-block:: yaml
  421. minion_id_remove_domain: foo.org
  422. .. conf_minion:: minion_id_lowercase
  423. ``minion_id_lowercase``
  424. -----------------------
  425. Default: ``False``
  426. Convert minion id to lowercase when it is being generated. Helpful when some hosts
  427. get the minion id in uppercase. Cached ids will remain the same and not converted.
  428. .. code-block:: yaml
  429. minion_id_lowercase: True
  430. .. conf_minion:: cachedir
  431. ``cachedir``
  432. ------------
  433. Default: ``/var/cache/salt/minion``
  434. The location for minion cache data.
  435. This directory may contain sensitive data and should be protected accordingly.
  436. .. code-block:: yaml
  437. cachedir: /var/cache/salt/minion
  438. .. conf_master:: color_theme
  439. ``color_theme``
  440. ---------------
  441. Default: ``""``
  442. Specifies a path to the color theme to use for colored command line output.
  443. .. code-block:: yaml
  444. color_theme: /etc/salt/color_theme
  445. .. conf_minion:: append_minionid_config_dirs
  446. ``append_minionid_config_dirs``
  447. -------------------------------
  448. Default: ``[]`` (the empty list) for regular minions, ``['cachedir']`` for proxy minions.
  449. Append minion_id to these configuration directories. Helps with multiple proxies
  450. and minions running on the same machine. Allowed elements in the list:
  451. ``pki_dir``, ``cachedir``, ``extension_modules``.
  452. Normally not needed unless running several proxies and/or minions on the same machine.
  453. .. code-block:: yaml
  454. append_minionid_config_dirs:
  455. - pki_dir
  456. - cachedir
  457. ``verify_env``
  458. --------------
  459. Default: ``True``
  460. Verify and set permissions on configuration directories at startup.
  461. .. code-block:: yaml
  462. verify_env: True
  463. .. note::
  464. When set to ``True`` the verify_env option requires WRITE access to the
  465. configuration directory (/etc/salt/). In certain situations such as
  466. mounting /etc/salt/ as read-only for templating this will create a stack
  467. trace when :py:func:`state.apply <salt.modules.state.apply_>` is called.
  468. .. conf_minion:: cache_jobs
  469. ``cache_jobs``
  470. --------------
  471. Default: ``False``
  472. The minion can locally cache the return data from jobs sent to it, this can be
  473. a good way to keep track of the minion side of the jobs the minion has
  474. executed. By default this feature is disabled, to enable set cache_jobs to
  475. ``True``.
  476. .. code-block:: yaml
  477. cache_jobs: False
  478. .. conf_minion:: grains
  479. ``grains``
  480. ----------
  481. Default: (empty)
  482. .. seealso::
  483. :ref:`static-custom-grains`
  484. Statically assigns grains to the minion.
  485. .. code-block:: yaml
  486. grains:
  487. roles:
  488. - webserver
  489. - memcache
  490. deployment: datacenter4
  491. cabinet: 13
  492. cab_u: 14-15
  493. .. conf_minion:: grains_blacklist
  494. ``grains_blacklist``
  495. --------------------
  496. Default: ``[]``
  497. Each grains key will be compared against each of the expressions in this list.
  498. Any keys which match will be filtered from the grains. Exact matches, glob
  499. matches, and regular expressions are supported.
  500. .. note::
  501. Some states and execution modules depend on grains. Filtering may cause
  502. them to be unavailable or run unreliably.
  503. .. versionadded:: 3000
  504. .. code-block:: yaml
  505. grains_blacklist:
  506. - cpu_flags
  507. - zmq*
  508. - ipv[46]
  509. .. conf_minion:: grains_cache
  510. ``grains_cache``
  511. ----------------
  512. Default: ``False``
  513. The minion can locally cache grain data instead of refreshing the data
  514. each time the grain is referenced. By default this feature is disabled,
  515. to enable set grains_cache to ``True``.
  516. .. code-block:: yaml
  517. grains_cache: False
  518. .. conf_minion:: grains_deep_merge
  519. ``grains_deep_merge``
  520. ---------------------
  521. .. versionadded:: 2016.3.0
  522. Default: ``False``
  523. The grains can be merged, instead of overridden, using this option.
  524. This allows custom grains to defined different subvalues of a dictionary
  525. grain. By default this feature is disabled, to enable set grains_deep_merge
  526. to ``True``.
  527. .. code-block:: yaml
  528. grains_deep_merge: False
  529. For example, with these custom grains functions:
  530. .. code-block:: python
  531. def custom1_k1():
  532. return {'custom1': {'k1': 'v1'}}
  533. def custom1_k2():
  534. return {'custom1': {'k2': 'v2'}}
  535. Without ``grains_deep_merge``, the result would be:
  536. .. code-block:: yaml
  537. custom1:
  538. k1: v1
  539. With ``grains_deep_merge``, the result will be:
  540. .. code-block:: yaml
  541. custom1:
  542. k1: v1
  543. k2: v2
  544. .. conf_minion:: grains_refresh_every
  545. ``grains_refresh_every``
  546. ------------------------
  547. Default: ``0``
  548. The ``grains_refresh_every`` setting allows for a minion to periodically
  549. check its grains to see if they have changed and, if so, to inform the master
  550. of the new grains. This operation is moderately expensive, therefore care
  551. should be taken not to set this value too low.
  552. Note: This value is expressed in minutes.
  553. A value of 10 minutes is a reasonable default.
  554. .. code-block:: yaml
  555. grains_refresh_every: 0
  556. .. conf_minion:: metadata_server_grains
  557. ``metadata_server_grains``
  558. --------------------------
  559. .. versionadded:: 2017.7.0
  560. Default: ``False``
  561. Set this option to enable gathering of cloud metadata from
  562. ``http://169.254.169.254/latest`` for use in grains (see :py:mod:`here
  563. <salt.grains.metadata>` for more information).
  564. .. code-block:: yaml
  565. metadata_server_grains: True
  566. .. conf_minion:: fibre_channel_grains
  567. ``fibre_channel_grains``
  568. ------------------------
  569. Default: ``False``
  570. The ``fibre_channel_grains`` setting will enable the ``fc_wwn`` grain for
  571. Fibre Channel WWN's on the minion. Since this grain is expensive, it is
  572. disabled by default.
  573. .. code-block:: yaml
  574. fibre_channel_grains: True
  575. .. conf_minion:: iscsi_grains
  576. ``iscsi_grains``
  577. ------------------------
  578. Default: ``False``
  579. The ``iscsi_grains`` setting will enable the ``iscsi_iqn`` grain on the
  580. minion. Since this grain is expensive, it is disabled by default.
  581. .. code-block:: yaml
  582. iscsi_grains: True
  583. .. conf_minion:: nvme_grains
  584. ``nvme_grains``
  585. ------------------------
  586. Default: ``False``
  587. The ``nvme_grains`` setting will enable the ``nvme_nqn`` grain on the
  588. minion. Since this grain is expensive, it is disabled by default.
  589. .. code-block:: yaml
  590. nvme_grains: True
  591. .. conf_minion:: mine_enabled
  592. ``mine_enabled``
  593. ----------------
  594. .. versionadded:: 2015.8.10
  595. Default: ``True``
  596. Determines whether or not the salt minion should run scheduled mine updates. If this is set to
  597. False then the mine update function will not get added to the scheduler for the minion.
  598. .. code-block:: yaml
  599. mine_enabled: True
  600. .. conf_minion:: mine_return_job
  601. ``mine_return_job``
  602. -------------------
  603. .. versionadded:: 2015.8.10
  604. Default: ``False``
  605. Determines whether or not scheduled mine updates should be accompanied by a job
  606. return for the job cache.
  607. .. code-block:: yaml
  608. mine_return_job: False
  609. ``mine_functions``
  610. ------------------
  611. Default: Empty
  612. Designate which functions should be executed at mine_interval intervals on each minion.
  613. :ref:`See this documentation on the Salt Mine <salt-mine>` for more information.
  614. Note these can be defined in the pillar for a minion as well.
  615. :ref:`example minion configuration file <configuration-examples-minion>`
  616. .. code-block:: yaml
  617. mine_functions:
  618. test.ping: []
  619. network.ip_addrs:
  620. interface: eth0
  621. cidr: '10.0.0.0/8'
  622. .. conf_minion:: mine_interval
  623. ``mine_interval``
  624. -----------------
  625. Default: ``60``
  626. The number of minutes between mine updates.
  627. .. code-block:: yaml
  628. mine_interval: 60
  629. .. conf_minion:: sock_dir
  630. ``sock_dir``
  631. ------------
  632. Default: ``/var/run/salt/minion``
  633. The directory where Unix sockets will be kept.
  634. .. code-block:: yaml
  635. sock_dir: /var/run/salt/minion
  636. .. conf_minion:: enable_gpu_grains
  637. ``enable_gpu_grains``
  638. ---------------------
  639. Default: ``True``
  640. Enable GPU hardware data for your master. Be aware that the minion can
  641. take a while to start up when lspci and/or dmidecode is used to populate the
  642. grains for the minion, so this can be set to ``False`` if you do not need these
  643. grains.
  644. .. code-block:: yaml
  645. enable_gpu_grains: False
  646. .. conf_minion:: outputter_dirs
  647. ``outputter_dirs``
  648. ------------------
  649. Default: ``[]``
  650. A list of additional directories to search for salt outputters in.
  651. .. code-block:: yaml
  652. outputter_dirs: []
  653. .. conf_minion:: backup_mode
  654. ``backup_mode``
  655. ---------------
  656. Default: ``''``
  657. Make backups of files replaced by ``file.managed`` and ``file.recurse`` state modules under
  658. :conf_minion:`cachedir` in ``file_backup`` subdirectory preserving original paths.
  659. Refer to :ref:`File State Backups documentation <file-state-backups>` for more details.
  660. .. code-block:: yaml
  661. backup_mode: minion
  662. .. conf_minion:: acceptance_wait_time
  663. ``acceptance_wait_time``
  664. ------------------------
  665. Default: ``10``
  666. The number of seconds to wait until attempting to re-authenticate with the
  667. master.
  668. .. code-block:: yaml
  669. acceptance_wait_time: 10
  670. .. conf_minion:: acceptance_wait_time_max
  671. ``acceptance_wait_time_max``
  672. ----------------------------
  673. Default: ``0``
  674. The maximum number of seconds to wait until attempting to re-authenticate
  675. with the master. If set, the wait will increase by :conf_minion:`acceptance_wait_time`
  676. seconds each iteration.
  677. .. code-block:: yaml
  678. acceptance_wait_time_max: 0
  679. .. conf_minion:: rejected_retry
  680. ``rejected_retry``
  681. ------------------
  682. Default: ``False``
  683. If the master rejects the minion's public key, retry instead of exiting.
  684. Rejected keys will be handled the same as waiting on acceptance.
  685. .. code-block:: yaml
  686. rejected_retry: False
  687. .. conf_minion:: random_reauth_delay
  688. ``random_reauth_delay``
  689. -----------------------
  690. Default: ``10``
  691. When the master key changes, the minion will try to re-auth itself to
  692. receive the new master key. In larger environments this can cause a syn-flood
  693. on the master because all minions try to re-auth immediately. To prevent this
  694. and have a minion wait for a random amount of time, use this optional
  695. parameter. The wait-time will be a random number of seconds between
  696. 0 and the defined value.
  697. .. code-block:: yaml
  698. random_reauth_delay: 60
  699. .. conf_minion:: master_tries
  700. ``master_tries``
  701. ----------------
  702. .. versionadded:: 2016.3.0
  703. Default: ``1``
  704. The number of attempts to connect to a master before giving up. Set this to
  705. ``-1`` for unlimited attempts. This allows for a master to have downtime and the
  706. minion to reconnect to it later when it comes back up. In 'failover' mode, which
  707. is set in the :conf_minion:`master_type` configuration, this value is the number
  708. of attempts for each set of masters. In this mode, it will cycle through the list
  709. of masters for each attempt.
  710. ``master_tries`` is different than :conf_minion:`auth_tries` because ``auth_tries``
  711. attempts to retry auth attempts with a single master. ``auth_tries`` is under the
  712. assumption that you can connect to the master but not gain authorization from it.
  713. ``master_tries`` will still cycle through all of the masters in a given try, so it
  714. is appropriate if you expect occasional downtime from the master(s).
  715. .. code-block:: yaml
  716. master_tries: 1
  717. .. conf_minion:: auth_tries
  718. ``auth_tries``
  719. --------------
  720. .. versionadded:: 2014.7.0
  721. Default: ``7``
  722. The number of attempts to authenticate to a master before giving up. Or, more
  723. technically, the number of consecutive SaltReqTimeoutErrors that are acceptable
  724. when trying to authenticate to the master.
  725. .. code-block:: yaml
  726. auth_tries: 7
  727. .. conf_minion:: auth_timeout
  728. ``auth_timeout``
  729. ----------------
  730. .. versionadded:: 2014.7.0
  731. Default: ``60``
  732. When waiting for a master to accept the minion's public key, salt will
  733. continuously attempt to reconnect until successful. This is the timeout value,
  734. in seconds, for each individual attempt. After this timeout expires, the minion
  735. will wait for :conf_minion:`acceptance_wait_time` seconds before trying again.
  736. Unless your master is under unusually heavy load, this should be left at the
  737. default.
  738. .. code-block:: yaml
  739. auth_timeout: 60
  740. .. conf_minion:: auth_safemode
  741. ``auth_safemode``
  742. -----------------
  743. .. versionadded:: 2014.7.0
  744. Default: ``False``
  745. If authentication fails due to SaltReqTimeoutError during a ping_interval,
  746. this setting, when set to ``True``, will cause a sub-minion process to
  747. restart.
  748. .. code-block:: yaml
  749. auth_safemode: False
  750. .. conf_minion:: ping_interval
  751. ``ping_interval``
  752. -----------------
  753. Default: ``0``
  754. Instructs the minion to ping its master(s) every n number of minutes. Used
  755. primarily as a mitigation technique against minion disconnects.
  756. .. code-block:: yaml
  757. ping_interval: 0
  758. .. conf_minion:: recon_default
  759. ``random_startup_delay``
  760. ------------------------
  761. Default: ``0``
  762. The maximum bound for an interval in which a minion will randomly sleep upon starting
  763. up prior to attempting to connect to a master. This can be used to splay connection attempts
  764. for cases where many minions starting up at once may place undue load on a master.
  765. For example, setting this to ``5`` will tell a minion to sleep for a value between ``0``
  766. and ``5`` seconds.
  767. .. code-block:: yaml
  768. random_startup_delay: 5
  769. .. conf_minion:: random_startup_delay
  770. ``recon_default``
  771. -----------------
  772. Default: ``1000``
  773. The interval in milliseconds that the socket should wait before trying to
  774. reconnect to the master (1000ms = 1 second).
  775. .. code-block:: yaml
  776. recon_default: 1000
  777. .. conf_minion:: recon_max
  778. ``recon_max``
  779. -------------
  780. Default: ``10000``
  781. The maximum time a socket should wait. Each interval the time to wait is calculated
  782. by doubling the previous time. If recon_max is reached, it starts again at
  783. the recon_default.
  784. Short example:
  785. - reconnect 1: the socket will wait 'recon_default' milliseconds
  786. - reconnect 2: 'recon_default' * 2
  787. - reconnect 3: ('recon_default' * 2) * 2
  788. - reconnect 4: value from previous interval * 2
  789. - reconnect 5: value from previous interval * 2
  790. - reconnect x: if value >= recon_max, it starts again with recon_default
  791. .. code-block:: yaml
  792. recon_max: 10000
  793. .. conf_minion:: recon_randomize
  794. ``recon_randomize``
  795. -------------------
  796. Default: ``True``
  797. Generate a random wait time on minion start. The wait time will be a random value
  798. between recon_default and recon_default + recon_max. Having all minions reconnect
  799. with the same recon_default and recon_max value kind of defeats the purpose of being
  800. able to change these settings. If all minions have the same values and the setup is
  801. quite large (several thousand minions), they will still flood the master. The desired
  802. behavior is to have time-frame within all minions try to reconnect.
  803. .. code-block:: yaml
  804. recon_randomize: True
  805. .. conf_minion:: loop_interval
  806. ``loop_interval``
  807. -----------------
  808. Default: ``1``
  809. The loop_interval sets how long in seconds the minion will wait between
  810. evaluating the scheduler and running cleanup tasks. This defaults to 1
  811. second on the minion scheduler.
  812. .. code-block:: yaml
  813. loop_interval: 1
  814. .. conf_minion:: pub_ret
  815. ``pub_ret``
  816. -----------
  817. Default: True
  818. Some installations choose to start all job returns in a cache or a returner
  819. and forgo sending the results back to a master. In this workflow, jobs
  820. are most often executed with --async from the Salt CLI and then results
  821. are evaluated by examining job caches on the minions or any configured returners.
  822. WARNING: Setting this to False will **disable** returns back to the master.
  823. .. code-block:: yaml
  824. pub_ret: True
  825. .. conf_minion:: return_retry_timer
  826. ``return_retry_timer``
  827. ----------------------
  828. Default: ``5``
  829. The default timeout for a minion return attempt.
  830. .. code-block:: yaml
  831. return_retry_timer: 5
  832. .. conf_minion:: return_retry_timer_max
  833. ``return_retry_timer_max``
  834. --------------------------
  835. Default: ``10``
  836. The maximum timeout for a minion return attempt. If non-zero the minion return
  837. retry timeout will be a random int between ``return_retry_timer`` and
  838. ``return_retry_timer_max``
  839. .. code-block:: yaml
  840. return_retry_timer_max: 10
  841. .. conf_minion:: cache_sreqs
  842. ``cache_sreqs``
  843. ---------------
  844. Default: ``True``
  845. The connection to the master ret_port is kept open. When set to False, the minion
  846. creates a new connection for every return to the master.
  847. .. code-block:: yaml
  848. cache_sreqs: True
  849. .. conf_minion:: ipc_mode
  850. ``ipc_mode``
  851. ------------
  852. Default: ``ipc``
  853. Windows platforms lack POSIX IPC and must rely on slower TCP based inter-
  854. process communications. ``ipc_mode`` is set to ``tcp`` on such systems.
  855. .. code-block:: yaml
  856. ipc_mode: ipc
  857. .. conf_minion:: tcp_pub_port
  858. ``tcp_pub_port``
  859. ----------------
  860. Default: ``4510``
  861. Publish port used when :conf_minion:`ipc_mode` is set to ``tcp``.
  862. .. code-block:: yaml
  863. tcp_pub_port: 4510
  864. .. conf_minion:: tcp_pull_port
  865. ``tcp_pull_port``
  866. -----------------
  867. Default: ``4511``
  868. Pull port used when :conf_minion:`ipc_mode` is set to ``tcp``.
  869. .. code-block:: yaml
  870. tcp_pull_port: 4511
  871. .. conf_minion:: transport
  872. ``transport``
  873. -------------
  874. Default: ``zeromq``
  875. Changes the underlying transport layer. ZeroMQ is the recommended transport
  876. while additional transport layers are under development. Supported values are
  877. ``zeromq`` and ``tcp`` (experimental). This setting has a significant impact
  878. on performance and should not be changed unless you know what you are doing!
  879. .. code-block:: yaml
  880. transport: zeromq
  881. .. conf_minion:: syndic_finger
  882. ``syndic_finger``
  883. -----------------
  884. Default: ``''``
  885. The key fingerprint of the higher-level master for the syndic to verify it is
  886. talking to the intended master.
  887. .. code-block:: yaml
  888. syndic_finger: 'ab:30:65:2a:d6:9e:20:4f:d8:b2:f3:a7:d4:65:50:10'
  889. .. conf_minion:: http_connect_timeout
  890. ``http_connect_timeout``
  891. ------------------------
  892. .. versionadded:: 2019.2.0
  893. Default: ``20``
  894. HTTP connection timeout in seconds.
  895. Applied when fetching files using tornado back-end.
  896. Should be greater than overall download time.
  897. .. code-block:: yaml
  898. http_connect_timeout: 20
  899. .. conf_minion:: http_request_timeout
  900. ``http_request_timeout``
  901. ------------------------
  902. .. versionadded:: 2015.8.0
  903. Default: ``3600``
  904. HTTP request timeout in seconds.
  905. Applied when fetching files using tornado back-end.
  906. Should be greater than overall download time.
  907. .. code-block:: yaml
  908. http_request_timeout: 3600
  909. .. conf_minion:: proxy_host
  910. ``proxy_host``
  911. --------------
  912. Default: ``''``
  913. The hostname used for HTTP proxy access.
  914. .. code-block:: yaml
  915. proxy_host: proxy.my-domain
  916. .. conf_minion:: proxy_port
  917. ``proxy_port``
  918. --------------
  919. Default: ``0``
  920. The port number used for HTTP proxy access.
  921. .. code-block:: yaml
  922. proxy_port: 31337
  923. .. conf_minion:: proxy_username
  924. ``proxy_username``
  925. ------------------
  926. Default: ``''``
  927. The username used for HTTP proxy access.
  928. .. code-block:: yaml
  929. proxy_username: charon
  930. .. conf_minion:: proxy_password
  931. ``proxy_password``
  932. ------------------
  933. Default: ``''``
  934. The password used for HTTP proxy access.
  935. .. code-block:: yaml
  936. proxy_password: obolus
  937. .. conf_minion:: no_proxy
  938. ``no_proxy``
  939. ------------
  940. .. versionadded:: 2019.2.0
  941. Default: ``[]``
  942. List of hosts to bypass HTTP proxy
  943. .. note::
  944. This key does nothing unless proxy_host etc is configured, it does not
  945. support any kind of wildcards.
  946. .. code-block:: yaml
  947. no_proxy: [ '127.0.0.1', 'foo.tld' ]
  948. ``use_yamlloader_old``
  949. ------------------------
  950. .. versionadded:: 2019.2.1
  951. Default: ``False``
  952. Use the pre-2019.2 YAML renderer.
  953. Uses legacy YAML rendering to support some legacy inline data structures.
  954. See the :ref:`2019.2.1 release notes <release-2019-2-1>` for more details.
  955. .. code-block:: yaml
  956. use_yamlloader_old: False
  957. Docker Configuration
  958. ====================
  959. .. conf_minion:: docker.update_mine
  960. ``docker.update_mine``
  961. ----------------------
  962. .. versionadded:: 2017.7.8,2018.3.3
  963. .. versionchanged:: 2019.2.0
  964. The default value is now ``False``
  965. Default: ``True``
  966. If enabled, when containers are added, removed, stopped, started, etc., the
  967. :ref:`mine <salt-mine>` will be updated with the results of :py:func:`docker.ps
  968. verbose=True all=True host=True <salt.modules.dockermod.ps>`. This mine data is
  969. used by :py:func:`mine.get_docker <salt.modules.mine.get_docker>`. Set this
  970. option to ``False`` to keep Salt from updating the mine with this information.
  971. .. note::
  972. This option can also be set in Grains or Pillar data, with Grains
  973. overriding Pillar and the minion config file overriding Grains.
  974. .. note::
  975. Disabling this will of course keep :py:func:`mine.get_docker
  976. <salt.modules.mine.get_docker>` from returning any information for a given
  977. minion.
  978. .. code-block:: yaml
  979. docker.update_mine: False
  980. .. conf_minion:: docker.compare_container_networks
  981. ``docker.compare_container_networks``
  982. -------------------------------------
  983. .. versionadded:: 2018.3.0
  984. Default: ``{'static': ['Aliases', 'Links', 'IPAMConfig'], 'automatic': ['IPAddress', 'Gateway', 'GlobalIPv6Address', 'IPv6Gateway']}``
  985. Specifies which keys are examined by
  986. :py:func:`docker.compare_container_networks
  987. <salt.modules.dockermod.compare_container_networks>`.
  988. .. note::
  989. This should not need to be modified unless new features added to Docker
  990. result in new keys added to the network configuration which must be
  991. compared to determine if two containers have different network configs.
  992. This config option exists solely as a way to allow users to continue using
  993. Salt to manage their containers after an API change, without waiting for a
  994. new Salt release to catch up to the changes in the Docker API.
  995. .. code-block:: yaml
  996. docker.compare_container_networks:
  997. static:
  998. - Aliases
  999. - Links
  1000. - IPAMConfig
  1001. automatic:
  1002. - IPAddress
  1003. - Gateway
  1004. - GlobalIPv6Address
  1005. - IPv6Gateway
  1006. .. conf_minion:: optimization_order
  1007. ``optimization_order``
  1008. ----------------------
  1009. Default: ``[0, 1, 2]``
  1010. In cases where Salt is distributed without .py files, this option determines
  1011. the priority of optimization level(s) Salt's module loader should prefer.
  1012. .. note::
  1013. This option is only supported on Python 3.5+.
  1014. .. code-block:: yaml
  1015. optimization_order:
  1016. - 2
  1017. - 0
  1018. - 1
  1019. Minion Execution Module Management
  1020. ==================================
  1021. .. conf_minion:: disable_modules
  1022. ``disable_modules``
  1023. -------------------
  1024. Default: ``[]`` (all execution modules are enabled by default)
  1025. The event may occur in which the administrator desires that a minion should not
  1026. be able to execute a certain module.
  1027. However, the ``sys`` module is built into the minion and cannot be disabled.
  1028. This setting can also tune the minion. Because all modules are loaded into system
  1029. memory, disabling modules will lower the minion's memory footprint.
  1030. Modules should be specified according to their file name on the system and not by
  1031. their virtual name. For example, to disable ``cmd``, use the string ``cmdmod`` which
  1032. corresponds to ``salt.modules.cmdmod``.
  1033. .. code-block:: yaml
  1034. disable_modules:
  1035. - test
  1036. - solr
  1037. .. conf_minion:: disable_returners
  1038. ``disable_returners``
  1039. ---------------------
  1040. Default: ``[]`` (all returners are enabled by default)
  1041. If certain returners should be disabled, this is the place
  1042. .. code-block:: yaml
  1043. disable_returners:
  1044. - mongo_return
  1045. .. conf_minion:: enable_whitelist_modules
  1046. ``whitelist_modules``
  1047. ---------------------
  1048. Default: ``[]`` (Module whitelisting is disabled. Adding anything to the config option
  1049. will cause only the listed modules to be enabled. Modules not in the list will
  1050. not be loaded.)
  1051. This option is the reverse of disable_modules. If enabled, only execution modules in this
  1052. list will be loaded and executed on the minion.
  1053. Note that this is a very large hammer and it can be quite difficult to keep the minion working
  1054. the way you think it should since Salt uses many modules internally itself. At a bare minimum
  1055. you need the following enabled or else the minion won't start.
  1056. .. code-block:: yaml
  1057. whitelist_modules:
  1058. - cmdmod
  1059. - test
  1060. - config
  1061. .. conf_minion:: module_dirs
  1062. ``module_dirs``
  1063. ---------------
  1064. Default: ``[]``
  1065. A list of extra directories to search for Salt modules
  1066. .. code-block:: yaml
  1067. module_dirs:
  1068. - /var/lib/salt/modules
  1069. .. conf_minion:: returner_dirs
  1070. ``returner_dirs``
  1071. -----------------
  1072. Default: ``[]``
  1073. A list of extra directories to search for Salt returners
  1074. .. code-block:: yaml
  1075. returner_dirs:
  1076. - /var/lib/salt/returners
  1077. .. conf_minion:: states_dirs
  1078. ``states_dirs``
  1079. ---------------
  1080. Default: ``[]``
  1081. A list of extra directories to search for Salt states
  1082. .. code-block:: yaml
  1083. states_dirs:
  1084. - /var/lib/salt/states
  1085. .. conf_minion:: grains_dirs
  1086. ``grains_dirs``
  1087. ---------------
  1088. Default: ``[]``
  1089. A list of extra directories to search for Salt grains
  1090. .. code-block:: yaml
  1091. grains_dirs:
  1092. - /var/lib/salt/grains
  1093. .. conf_minion:: render_dirs
  1094. ``render_dirs``
  1095. ---------------
  1096. Default: ``[]``
  1097. A list of extra directories to search for Salt renderers
  1098. .. code-block:: yaml
  1099. render_dirs:
  1100. - /var/lib/salt/renderers
  1101. .. conf_minion:: utils_dirs
  1102. ``utils_dirs``
  1103. --------------
  1104. Default: ``[]``
  1105. A list of extra directories to search for Salt utilities
  1106. .. code-block:: yaml
  1107. utils_dirs:
  1108. - /var/lib/salt/utils
  1109. .. conf_minion:: cython_enable
  1110. ``cython_enable``
  1111. -----------------
  1112. Default: ``False``
  1113. Set this value to true to enable auto-loading and compiling of ``.pyx`` modules,
  1114. This setting requires that ``gcc`` and ``cython`` are installed on the minion.
  1115. .. code-block:: yaml
  1116. cython_enable: False
  1117. .. conf_minion:: enable_zip_modules
  1118. ``enable_zip_modules``
  1119. ----------------------
  1120. .. versionadded:: 2015.8.0
  1121. Default: ``False``
  1122. Set this value to true to enable loading of zip archives as extension modules.
  1123. This allows for packing module code with specific dependencies to avoid conflicts
  1124. and/or having to install specific modules' dependencies in system libraries.
  1125. .. code-block:: yaml
  1126. enable_zip_modules: False
  1127. .. conf_minion:: providers
  1128. ``providers``
  1129. -------------
  1130. Default: (empty)
  1131. A module provider can be statically overwritten or extended for the minion via
  1132. the ``providers`` option. This can be done :ref:`on an individual basis in an
  1133. SLS file <state-providers>`, or globally here in the minion config, like
  1134. below.
  1135. .. code-block:: yaml
  1136. providers:
  1137. service: systemd
  1138. .. conf_minion:: modules_max_memory
  1139. ``modules_max_memory``
  1140. ----------------------
  1141. Default: ``-1``
  1142. Specify a max size (in bytes) for modules on import. This feature is currently
  1143. only supported on \*NIX operating systems and requires psutil.
  1144. .. code-block:: yaml
  1145. modules_max_memory: -1
  1146. .. conf_minion:: extmod_whitelist
  1147. .. conf_minion:: extmod_blacklist
  1148. ``extmod_whitelist/extmod_blacklist``
  1149. -------------------------------------
  1150. .. versionadded:: 2017.7.0
  1151. By using this dictionary, the modules that are synced to the minion's extmod cache using `saltutil.sync_*` can be
  1152. limited. If nothing is set to a specific type, then all modules are accepted. To block all modules of a specific type,
  1153. whitelist an empty list.
  1154. .. code-block:: yaml
  1155. extmod_whitelist:
  1156. modules:
  1157. - custom_module
  1158. engines:
  1159. - custom_engine
  1160. pillars: []
  1161. extmod_blacklist:
  1162. modules:
  1163. - specific_module
  1164. Valid options:
  1165. - beacons
  1166. - clouds
  1167. - sdb
  1168. - modules
  1169. - states
  1170. - grains
  1171. - renderers
  1172. - returners
  1173. - proxy
  1174. - engines
  1175. - output
  1176. - utils
  1177. - pillar
  1178. Top File Settings
  1179. =================
  1180. These parameters only have an effect if running a masterless minion.
  1181. .. conf_minion:: state_top
  1182. ``state_top``
  1183. -------------
  1184. Default: ``top.sls``
  1185. The state system uses a "top" file to tell the minions what environment to
  1186. use and what modules to use. The state_top file is defined relative to the
  1187. root of the base environment.
  1188. .. code-block:: yaml
  1189. state_top: top.sls
  1190. .. conf_minion:: state_top_saltenv
  1191. ``state_top_saltenv``
  1192. ---------------------
  1193. This option has no default value. Set it to an environment name to ensure that
  1194. *only* the top file from that environment is considered during a
  1195. :ref:`highstate <running-highstate>`.
  1196. .. note::
  1197. Using this value does not change the merging strategy. For instance, if
  1198. :conf_minion:`top_file_merging_strategy` is set to ``merge``, and
  1199. :conf_minion:`state_top_saltenv` is set to ``foo``, then any sections for
  1200. environments other than ``foo`` in the top file for the ``foo`` environment
  1201. will be ignored. With :conf_minion:`state_top_saltenv` set to ``base``, all
  1202. states from all environments in the ``base`` top file will be applied,
  1203. while all other top files are ignored. The only way to set
  1204. :conf_minion:`state_top_saltenv` to something other than ``base`` and not
  1205. have the other environments in the targeted top file ignored, would be to
  1206. set :conf_minion:`top_file_merging_strategy` to ``merge_all``.
  1207. .. code-block:: yaml
  1208. state_top_saltenv: dev
  1209. .. conf_minion:: top_file_merging_strategy
  1210. ``top_file_merging_strategy``
  1211. -----------------------------
  1212. .. versionchanged:: 2016.11.0
  1213. A ``merge_all`` strategy has been added.
  1214. Default: ``merge``
  1215. When no specific fileserver environment (a.k.a. ``saltenv``) has been specified
  1216. for a :ref:`highstate <running-highstate>`, all environments' top files are
  1217. inspected. This config option determines how the SLS targets in those top files
  1218. are handled.
  1219. When set to ``merge``, the ``base`` environment's top file is evaluated first,
  1220. followed by the other environments' top files. The first target expression
  1221. (e.g. ``'*'``) for a given environment is kept, and when the same target
  1222. expression is used in a different top file evaluated later, it is ignored.
  1223. Because ``base`` is evaluated first, it is authoritative. For example, if there
  1224. is a target for ``'*'`` for the ``foo`` environment in both the ``base`` and
  1225. ``foo`` environment's top files, the one in the ``foo`` environment would be
  1226. ignored. The environments will be evaluated in no specific order (aside from
  1227. ``base`` coming first). For greater control over the order in which the
  1228. environments are evaluated, use :conf_minion:`env_order`. Note that, aside from
  1229. the ``base`` environment's top file, any sections in top files that do not
  1230. match that top file's environment will be ignored. So, for example, a section
  1231. for the ``qa`` environment would be ignored if it appears in the ``dev``
  1232. environment's top file. To keep use cases like this from being ignored, use the
  1233. ``merge_all`` strategy.
  1234. When set to ``same``, then for each environment, only that environment's top
  1235. file is processed, with the others being ignored. For example, only the ``dev``
  1236. environment's top file will be processed for the ``dev`` environment, and any
  1237. SLS targets defined for ``dev`` in the ``base`` environment's (or any other
  1238. environment's) top file will be ignored. If an environment does not have a top
  1239. file, then the top file from the :conf_minion:`default_top` config parameter
  1240. will be used as a fallback.
  1241. When set to ``merge_all``, then all states in all environments in all top files
  1242. will be applied. The order in which individual SLS files will be executed will
  1243. depend on the order in which the top files were evaluated, and the environments
  1244. will be evaluated in no specific order. For greater control over the order in
  1245. which the environments are evaluated, use :conf_minion:`env_order`.
  1246. .. code-block:: yaml
  1247. top_file_merging_strategy: same
  1248. .. conf_minion:: env_order
  1249. ``env_order``
  1250. -------------
  1251. Default: ``[]``
  1252. When :conf_minion:`top_file_merging_strategy` is set to ``merge``, and no
  1253. environment is specified for a :ref:`highstate <running-highstate>`, this
  1254. config option allows for the order in which top files are evaluated to be
  1255. explicitly defined.
  1256. .. code-block:: yaml
  1257. env_order:
  1258. - base
  1259. - dev
  1260. - qa
  1261. .. conf_minion:: default_top
  1262. ``default_top``
  1263. ---------------
  1264. Default: ``base``
  1265. When :conf_minion:`top_file_merging_strategy` is set to ``same``, and no
  1266. environment is specified for a :ref:`highstate <running-highstate>` (i.e.
  1267. :conf_minion:`environment` is not set for the minion), this config option
  1268. specifies a fallback environment in which to look for a top file if an
  1269. environment lacks one.
  1270. .. code-block:: yaml
  1271. default_top: dev
  1272. .. conf_minion:: startup_states
  1273. ``startup_states``
  1274. ------------------
  1275. Default: ``''``
  1276. States to run when the minion daemon starts. To enable, set ``startup_states`` to:
  1277. - ``highstate``: Execute state.highstate
  1278. - ``sls``: Read in the sls_list option and execute the named sls files
  1279. - ``top``: Read top_file option and execute based on that file on the Master
  1280. .. code-block:: yaml
  1281. startup_states: ''
  1282. .. conf_minion:: sls_list
  1283. ``sls_list``
  1284. ------------
  1285. Default: ``[]``
  1286. List of states to run when the minion starts up if ``startup_states`` is set to ``sls``.
  1287. .. code-block:: yaml
  1288. sls_list:
  1289. - edit.vim
  1290. - hyper
  1291. .. conf_minion:: start_event_grains
  1292. ``start_event_grains``
  1293. ----------------------
  1294. Default: ``[]``
  1295. List of grains to pass in start event when minion starts up.
  1296. .. code-block:: yaml
  1297. start_event_grains:
  1298. - machine_id
  1299. - uuid
  1300. .. conf_minion:: top_file
  1301. ``top_file``
  1302. ------------
  1303. Default: ``''``
  1304. Top file to execute if ``startup_states`` is set to ``top``.
  1305. .. code-block:: yaml
  1306. top_file: ''
  1307. State Management Settings
  1308. =========================
  1309. .. conf_minion:: renderer
  1310. ``renderer``
  1311. ------------
  1312. Default: ``jinja|yaml``
  1313. The default renderer used for local state executions
  1314. .. code-block:: yaml
  1315. renderer: jinja|json
  1316. .. conf_minion:: test
  1317. ``test``
  1318. --------
  1319. Default: ``False``
  1320. Set all state calls to only test if they are going to actually make changes
  1321. or just post what changes are going to be made.
  1322. .. code-block:: yaml
  1323. test: False
  1324. .. conf_minion:: state_verbose
  1325. ``state_verbose``
  1326. -----------------
  1327. Default: ``True``
  1328. Controls the verbosity of state runs. By default, the results of all states are
  1329. returned, but setting this value to ``False`` will cause salt to only display
  1330. output for states that failed or states that have changes.
  1331. .. code-block:: yaml
  1332. state_verbose: True
  1333. .. conf_minion:: state_output
  1334. ``state_output``
  1335. ----------------
  1336. Default: ``full``
  1337. The state_output setting controls which results will be output full multi line:
  1338. * ``full``, ``terse`` - each state will be full/terse
  1339. * ``mixed`` - only states with errors will be full
  1340. * ``changes`` - states with changes and errors will be full
  1341. ``full_id``, ``mixed_id``, ``changes_id`` and ``terse_id`` are also allowed;
  1342. when set, the state ID will be used as name in the output.
  1343. .. code-block:: yaml
  1344. state_output: full
  1345. .. conf_minion:: state_output_diff
  1346. ``state_output_diff``
  1347. ---------------------
  1348. Default: ``False``
  1349. The state_output_diff setting changes whether or not the output from
  1350. successful states is returned. Useful when even the terse output of these
  1351. states is cluttering the logs. Set it to True to ignore them.
  1352. .. code-block:: yaml
  1353. state_output_diff: False
  1354. .. conf_minion:: autoload_dynamic_modules
  1355. ``autoload_dynamic_modules``
  1356. ----------------------------
  1357. Default: ``True``
  1358. autoload_dynamic_modules turns on automatic loading of modules found in the
  1359. environments on the master. This is turned on by default. To turn off
  1360. auto-loading modules when states run, set this value to ``False``.
  1361. .. code-block:: yaml
  1362. autoload_dynamic_modules: True
  1363. .. conf_minion:: clean_dynamic_modules
  1364. Default: ``True``
  1365. clean_dynamic_modules keeps the dynamic modules on the minion in sync with
  1366. the dynamic modules on the master. This means that if a dynamic module is
  1367. not on the master it will be deleted from the minion. By default this is
  1368. enabled and can be disabled by changing this value to ``False``.
  1369. .. code-block:: yaml
  1370. clean_dynamic_modules: True
  1371. .. note::
  1372. If ``extmod_whitelist`` is specified, modules which are not whitelisted will also be cleaned here.
  1373. .. conf_minion:: environment
  1374. .. conf_minion:: saltenv
  1375. ``saltenv``
  1376. -----------
  1377. .. versionchanged:: 2018.3.0
  1378. Renamed from ``environment`` to ``saltenv``. If ``environment`` is used,
  1379. ``saltenv`` will take its value. If both are used, ``environment`` will be
  1380. ignored and ``saltenv`` will be used.
  1381. Normally the minion is not isolated to any single environment on the master
  1382. when running states, but the environment can be isolated on the minion side
  1383. by statically setting it. Remember that the recommended way to manage
  1384. environments is to isolate via the top file.
  1385. .. code-block:: yaml
  1386. saltenv: dev
  1387. .. conf_minion:: lock_saltenv
  1388. ``lock_saltenv``
  1389. ----------------
  1390. .. versionadded:: 2018.3.0
  1391. Default: ``False``
  1392. For purposes of running states, this option prevents using the ``saltenv``
  1393. argument to manually set the environment. This is useful to keep a minion which
  1394. has the :conf_minion:`saltenv` option set to ``dev`` from running states from
  1395. an environment other than ``dev``.
  1396. .. code-block:: yaml
  1397. lock_saltenv: True
  1398. .. conf_minion:: snapper_states
  1399. ``snapper_states``
  1400. ------------------
  1401. Default: False
  1402. The `snapper_states` value is used to enable taking snapper snapshots before
  1403. and after salt state runs. This allows for state runs to be rolled back.
  1404. For snapper states to function properly snapper needs to be installed and
  1405. enabled.
  1406. .. code-block:: yaml
  1407. snapper_states: True
  1408. .. conf_minion:: snapper_states_config
  1409. ``snapper_states_config``
  1410. -------------------------
  1411. Default: ``root``
  1412. Snapper can execute based on a snapper configuration. The configuration
  1413. needs to be set up before snapper can use it. The default configuration
  1414. is ``root``, this default makes snapper run on SUSE systems using the
  1415. default configuration set up at install time.
  1416. .. code-block:: yaml
  1417. snapper_states_config: root
  1418. File Directory Settings
  1419. =======================
  1420. .. conf_minion:: file_client
  1421. ``file_client``
  1422. ---------------
  1423. Default: ``remote``
  1424. The client defaults to looking on the master server for files, but can be
  1425. directed to look on the minion by setting this parameter to ``local``.
  1426. .. code-block:: yaml
  1427. file_client: remote
  1428. .. conf_minion:: use_master_when_local
  1429. ``use_master_when_local``
  1430. -------------------------
  1431. Default: ``False``
  1432. When using a local :conf_minion:`file_client`, this parameter is used to allow
  1433. the client to connect to a master for remote execution.
  1434. .. code-block:: yaml
  1435. use_master_when_local: False
  1436. .. conf_minion:: file_roots
  1437. ``file_roots``
  1438. --------------
  1439. Default:
  1440. .. code-block:: yaml
  1441. base:
  1442. - /srv/salt
  1443. When using a local :conf_minion:`file_client`, this parameter is used to setup
  1444. the fileserver's environments. This parameter operates identically to the
  1445. :conf_master:`master config parameter <file_roots>` of the same name.
  1446. .. code-block:: yaml
  1447. file_roots:
  1448. base:
  1449. - /srv/salt
  1450. dev:
  1451. - /srv/salt/dev/services
  1452. - /srv/salt/dev/states
  1453. prod:
  1454. - /srv/salt/prod/services
  1455. - /srv/salt/prod/states
  1456. .. conf_minion:: fileserver_followsymlinks
  1457. ``fileserver_followsymlinks``
  1458. -----------------------------
  1459. .. versionadded:: 2014.1.0
  1460. Default: ``True``
  1461. By default, the file_server follows symlinks when walking the filesystem tree.
  1462. Currently this only applies to the default roots fileserver_backend.
  1463. .. code-block:: yaml
  1464. fileserver_followsymlinks: True
  1465. .. conf_minion:: fileserver_ignoresymlinks
  1466. ``fileserver_ignoresymlinks``
  1467. -----------------------------
  1468. .. versionadded:: 2014.1.0
  1469. Default: ``False``
  1470. If you do not want symlinks to be treated as the files they are pointing to,
  1471. set ``fileserver_ignoresymlinks`` to ``True``. By default this is set to
  1472. False. When set to ``True``, any detected symlink while listing files on the
  1473. Master will not be returned to the Minion.
  1474. .. code-block:: yaml
  1475. fileserver_ignoresymlinks: False
  1476. .. conf_minion:: fileserver_limit_traversal
  1477. ``fileserver_limit_traversal``
  1478. ------------------------------
  1479. .. versionadded:: 2014.1.0
  1480. Default: ``False``
  1481. By default, the Salt fileserver recurses fully into all defined environments
  1482. to attempt to find files. To limit this behavior so that the fileserver only
  1483. traverses directories with SLS files and special Salt directories like _modules,
  1484. set ``fileserver_limit_traversal`` to ``True``. This might be useful for
  1485. installations where a file root has a very large number of files and performance
  1486. is impacted.
  1487. .. code-block:: yaml
  1488. fileserver_limit_traversal: False
  1489. .. conf_minion:: hash_type
  1490. ``hash_type``
  1491. -------------
  1492. Default: ``sha256``
  1493. The hash_type is the hash to use when discovering the hash of a file on the
  1494. local fileserver. The default is sha256, but md5, sha1, sha224, sha384, and
  1495. sha512 are also supported.
  1496. .. code-block:: yaml
  1497. hash_type: sha256
  1498. .. _pillar-configuration-minion:
  1499. Pillar Configuration
  1500. ====================
  1501. .. conf_minion:: pillar_roots
  1502. ``pillar_roots``
  1503. ----------------
  1504. Default:
  1505. .. code-block:: yaml
  1506. base:
  1507. - /srv/pillar
  1508. When using a local :conf_minion:`file_client`, this parameter is used to setup
  1509. the pillar environments.
  1510. .. code-block:: yaml
  1511. pillar_roots:
  1512. base:
  1513. - /srv/pillar
  1514. dev:
  1515. - /srv/pillar/dev
  1516. prod:
  1517. - /srv/pillar/prod
  1518. .. conf_minion:: on_demand_ext_pillar
  1519. ``on_demand_ext_pillar``
  1520. ------------------------
  1521. .. versionadded:: 2016.3.6,2016.11.3,2017.7.0
  1522. Default: ``['libvirt', 'virtkey']``
  1523. When using a local :conf_minion:`file_client`, this option controls which
  1524. external pillars are permitted to be used on-demand using :py:func:`pillar.ext
  1525. <salt.modules.pillar.ext>`.
  1526. .. code-block:: yaml
  1527. on_demand_ext_pillar:
  1528. - libvirt
  1529. - virtkey
  1530. - git
  1531. .. warning::
  1532. This will allow a masterless minion to request specific pillar data via
  1533. :py:func:`pillar.ext <salt.modules.pillar.ext>`, and may be considered a
  1534. security risk. However, pillar data generated in this way will not affect
  1535. the :ref:`in-memory pillar data <pillar-in-memory>`, so this risk is
  1536. limited to instances in which states/modules/etc. (built-in or custom) rely
  1537. upon pillar data generated by :py:func:`pillar.ext
  1538. <salt.modules.pillar.ext>`.
  1539. .. conf_minion:: decrypt_pillar
  1540. ``decrypt_pillar``
  1541. ------------------
  1542. .. versionadded:: 2017.7.0
  1543. Default: ``[]``
  1544. A list of paths to be recursively decrypted during pillar compilation.
  1545. .. code-block:: yaml
  1546. decrypt_pillar:
  1547. - 'foo:bar': gpg
  1548. - 'lorem:ipsum:dolor'
  1549. Entries in this list can be formatted either as a simple string, or as a
  1550. key/value pair, with the key being the pillar location, and the value being the
  1551. renderer to use for pillar decryption. If the former is used, the renderer
  1552. specified by :conf_minion:`decrypt_pillar_default` will be used.
  1553. .. conf_minion:: decrypt_pillar_delimiter
  1554. ``decrypt_pillar_delimiter``
  1555. ----------------------------
  1556. .. versionadded:: 2017.7.0
  1557. Default: ``:``
  1558. The delimiter used to distinguish nested data structures in the
  1559. :conf_minion:`decrypt_pillar` option.
  1560. .. code-block:: yaml
  1561. decrypt_pillar_delimiter: '|'
  1562. decrypt_pillar:
  1563. - 'foo|bar': gpg
  1564. - 'lorem|ipsum|dolor'
  1565. .. conf_minion:: decrypt_pillar_default
  1566. ``decrypt_pillar_default``
  1567. --------------------------
  1568. .. versionadded:: 2017.7.0
  1569. Default: ``gpg``
  1570. The default renderer used for decryption, if one is not specified for a given
  1571. pillar key in :conf_minion:`decrypt_pillar`.
  1572. .. code-block:: yaml
  1573. decrypt_pillar_default: my_custom_renderer
  1574. .. conf_minion:: decrypt_pillar_renderers
  1575. ``decrypt_pillar_renderers``
  1576. ----------------------------
  1577. .. versionadded:: 2017.7.0
  1578. Default: ``['gpg']``
  1579. List of renderers which are permitted to be used for pillar decryption.
  1580. .. code-block:: yaml
  1581. decrypt_pillar_renderers:
  1582. - gpg
  1583. - my_custom_renderer
  1584. .. conf_minion:: pillarenv
  1585. ``pillarenv``
  1586. -------------
  1587. Default: ``None``
  1588. Isolates the pillar environment on the minion side. This functions the same as
  1589. the environment setting, but for pillar instead of states.
  1590. .. code-block:: yaml
  1591. pillarenv: dev
  1592. .. conf_minion:: pillarenv_from_saltenv
  1593. ``pillarenv_from_saltenv``
  1594. --------------------------
  1595. .. versionadded:: 2017.7.0
  1596. Default: ``False``
  1597. When set to ``True``, the :conf_minion:`pillarenv` value will assume the value
  1598. of the effective saltenv when running states. This essentially makes ``salt '*'
  1599. state.sls mysls saltenv=dev`` equivalent to ``salt '*' state.sls mysls
  1600. saltenv=dev pillarenv=dev``. If :conf_minion:`pillarenv` is set, either in the
  1601. minion config file or via the CLI, it will override this option.
  1602. .. code-block:: yaml
  1603. pillarenv_from_saltenv: True
  1604. .. conf_minion:: pillar_raise_on_missing
  1605. ``pillar_raise_on_missing``
  1606. ---------------------------
  1607. .. versionadded:: 2015.5.0
  1608. Default: ``False``
  1609. Set this option to ``True`` to force a ``KeyError`` to be raised whenever an
  1610. attempt to retrieve a named value from pillar fails. When this option is set
  1611. to ``False``, the failed attempt returns an empty string.
  1612. .. conf_minion:: minion_pillar_cache
  1613. ``minion_pillar_cache``
  1614. -----------------------
  1615. .. versionadded:: 2016.3.0
  1616. Default: ``False``
  1617. The minion can locally cache rendered pillar data under
  1618. :conf_minion:`cachedir`/pillar. This allows a temporarily disconnected minion
  1619. to access previously cached pillar data by invoking salt-call with the --local
  1620. and --pillar_root=:conf_minion:`cachedir`/pillar options. Before enabling this
  1621. setting consider that the rendered pillar may contain security sensitive data.
  1622. Appropriate access restrictions should be in place. By default the saved pillar
  1623. data will be readable only by the user account running salt. By default this
  1624. feature is disabled, to enable set minion_pillar_cache to ``True``.
  1625. .. code-block:: yaml
  1626. minion_pillar_cache: False
  1627. .. conf_minion:: file_recv_max_size
  1628. ``file_recv_max_size``
  1629. ----------------------
  1630. .. versionadded:: 2014.7.0
  1631. Default: ``100``
  1632. Set a hard-limit on the size of the files that can be pushed to the master.
  1633. It will be interpreted as megabytes.
  1634. .. code-block:: yaml
  1635. file_recv_max_size: 100
  1636. .. conf_minion:: pass_to_ext_pillars
  1637. ``pass_to_ext_pillars``
  1638. -----------------------
  1639. Specify a list of configuration keys whose values are to be passed to
  1640. external pillar functions.
  1641. Suboptions can be specified using the ':' notation (i.e. ``option:suboption``)
  1642. The values are merged and included in the ``extra_minion_data`` optional
  1643. parameter of the external pillar function. The ``extra_minion_data`` parameter
  1644. is passed only to the external pillar functions that have it explicitly
  1645. specified in their definition.
  1646. If the config contains
  1647. .. code-block:: yaml
  1648. opt1: value1
  1649. opt2:
  1650. subopt1: value2
  1651. subopt2: value3
  1652. pass_to_ext_pillars:
  1653. - opt1
  1654. - opt2: subopt1
  1655. the ``extra_minion_data`` parameter will be
  1656. .. code-block:: python
  1657. {'opt1': 'value1',
  1658. 'opt2': {'subopt1': 'value2'}}
  1659. Security Settings
  1660. =================
  1661. .. conf_minion:: open_mode
  1662. ``open_mode``
  1663. -------------
  1664. Default: ``False``
  1665. Open mode can be used to clean out the PKI key received from the Salt master,
  1666. turn on open mode, restart the minion, then turn off open mode and restart the
  1667. minion to clean the keys.
  1668. .. code-block:: yaml
  1669. open_mode: False
  1670. .. conf_minion:: master_finger
  1671. ``master_finger``
  1672. -----------------
  1673. Default: ``''``
  1674. Fingerprint of the master public key to validate the identity of your Salt master
  1675. before the initial key exchange. The master fingerprint can be found by running
  1676. "salt-key -F master" on the Salt master.
  1677. .. code-block:: yaml
  1678. master_finger: 'ba:30:65:2a:d6:9e:20:4f:d8:b2:f3:a7:d4:65:11:13'
  1679. .. conf_minion:: keysize
  1680. ``keysize``
  1681. -----------
  1682. Default: ``2048``
  1683. The size of key that should be generated when creating new keys.
  1684. .. code-block:: yaml
  1685. keysize: 2048
  1686. .. conf_minion:: permissive_pki_access
  1687. ``permissive_pki_access``
  1688. -------------------------
  1689. Default: ``False``
  1690. Enable permissive access to the salt keys. This allows you to run the
  1691. master or minion as root, but have a non-root group be given access to
  1692. your pki_dir. To make the access explicit, root must belong to the group
  1693. you've given access to. This is potentially quite insecure.
  1694. .. code-block:: yaml
  1695. permissive_pki_access: False
  1696. .. conf_minion:: verify_master_pubkey_sign
  1697. ``verify_master_pubkey_sign``
  1698. -----------------------------
  1699. Default: ``False``
  1700. Enables verification of the master-public-signature returned by the master in
  1701. auth-replies. Please see the tutorial on how to configure this properly
  1702. `Multimaster-PKI with Failover Tutorial <http://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html>`_
  1703. .. versionadded:: 2014.7.0
  1704. .. code-block:: yaml
  1705. verify_master_pubkey_sign: True
  1706. If this is set to ``True``, :conf_master:`master_sign_pubkey` must be also set
  1707. to ``True`` in the master configuration file.
  1708. .. conf_minion:: master_sign_key_name
  1709. ``master_sign_key_name``
  1710. ------------------------
  1711. Default: ``master_sign``
  1712. The filename without the *.pub* suffix of the public key that should be used
  1713. for verifying the signature from the master. The file must be located in the
  1714. minion's pki directory.
  1715. .. versionadded:: 2014.7.0
  1716. .. code-block:: yaml
  1717. master_sign_key_name: <filename_without_suffix>
  1718. .. conf_minion:: autosign_grains
  1719. ``autosign_grains``
  1720. -------------------
  1721. .. versionadded:: 2018.3.0
  1722. Default: ``not defined``
  1723. The grains that should be sent to the master on authentication to decide if
  1724. the minion's key should be accepted automatically.
  1725. Please see the :ref:`Autoaccept Minions from Grains <tutorial-autoaccept-grains>`
  1726. documentation for more information.
  1727. .. code-block:: yaml
  1728. autosign_grains:
  1729. - uuid
  1730. - server_id
  1731. .. conf_minion:: always_verify_signature
  1732. ``always_verify_signature``
  1733. ---------------------------
  1734. Default: ``False``
  1735. If :conf_minion:`verify_master_pubkey_sign` is enabled, the signature is only verified
  1736. if the public-key of the master changes. If the signature should always be verified,
  1737. this can be set to ``True``.
  1738. .. versionadded:: 2014.7.0
  1739. .. code-block:: yaml
  1740. always_verify_signature: True
  1741. .. conf_minion:: cmd_blacklist_glob
  1742. ``cmd_blacklist_glob``
  1743. ----------------------
  1744. Default: ``[]``
  1745. If :conf_minion:`cmd_blacklist_glob` is enabled then any shell command called over
  1746. remote execution or via salt-call will be checked against the glob matches found in
  1747. the `cmd_blacklist_glob` list and any matched shell command will be blocked.
  1748. .. note::
  1749. This blacklist is only applied to direct executions made by the `salt` and
  1750. `salt-call` commands. This does NOT blacklist commands called from states
  1751. or shell commands executed from other modules.
  1752. .. versionadded:: 2016.11.0
  1753. .. code-block:: yaml
  1754. cmd_blacklist_glob:
  1755. - 'rm * '
  1756. - 'cat /etc/* '
  1757. .. conf_minion:: cmd_whitelist_glob
  1758. ``cmd_whitelist_glob``
  1759. ----------------------
  1760. Default: ``[]``
  1761. If :conf_minion:`cmd_whitelist_glob` is enabled then any shell command called over
  1762. remote execution or via salt-call will be checked against the glob matches found in
  1763. the `cmd_whitelist_glob` list and any shell command NOT found in the list will be
  1764. blocked. If `cmd_whitelist_glob` is NOT SET, then all shell commands are permitted.
  1765. .. note::
  1766. This whitelist is only applied to direct executions made by the `salt` and
  1767. `salt-call` commands. This does NOT restrict commands called from states
  1768. or shell commands executed from other modules.
  1769. .. versionadded:: 2016.11.0
  1770. .. code-block:: yaml
  1771. cmd_whitelist_glob:
  1772. - 'ls * '
  1773. - 'cat /etc/fstab'
  1774. .. conf_minion:: ssl
  1775. ``ssl``
  1776. -------
  1777. .. versionadded:: 2016.11.0
  1778. Default: ``None``
  1779. TLS/SSL connection options. This could be set to a dictionary containing
  1780. arguments corresponding to python ``ssl.wrap_socket`` method. For details see
  1781. `Tornado <http://www.tornadoweb.org/en/stable/tcpserver.html#tornado.tcpserver.TCPServer>`_
  1782. and `Python <http://docs.python.org/2/library/ssl.html#ssl.wrap_socket>`_
  1783. documentation.
  1784. Note: to set enum arguments values like ``cert_reqs`` and ``ssl_version`` use
  1785. constant names without ssl module prefix: ``CERT_REQUIRED`` or ``PROTOCOL_SSLv23``.
  1786. .. code-block:: yaml
  1787. ssl:
  1788. keyfile: <path_to_keyfile>
  1789. certfile: <path_to_certfile>
  1790. ssl_version: PROTOCOL_TLSv1_2
  1791. Reactor Settings
  1792. ================
  1793. .. conf_minion:: reactor
  1794. ``reactor``
  1795. -----------
  1796. Default: ``[]``
  1797. Defines a salt reactor. See the :ref:`Reactor <reactor>` documentation for more
  1798. information.
  1799. .. code-block:: yaml
  1800. reactor: []
  1801. .. conf_minion:: reactor_refresh_interval
  1802. ``reactor_refresh_interval``
  1803. ----------------------------
  1804. Default: ``60``
  1805. The TTL for the cache of the reactor configuration.
  1806. .. code-block:: yaml
  1807. reactor_refresh_interval: 60
  1808. .. conf_minion:: reactor_worker_threads
  1809. ``reactor_worker_threads``
  1810. --------------------------
  1811. Default: ``10``
  1812. The number of workers for the runner/wheel in the reactor.
  1813. .. code-block:: yaml
  1814. reactor_worker_threads: 10
  1815. .. conf_minion:: reactor_worker_hwm
  1816. ``reactor_worker_hwm``
  1817. ----------------------
  1818. Default: ``10000``
  1819. The queue size for workers in the reactor.
  1820. .. code-block:: yaml
  1821. reactor_worker_hwm: 10000
  1822. Thread Settings
  1823. ===============
  1824. .. conf_minion:: multiprocessing
  1825. ``multiprocessing``
  1826. -------------------
  1827. Default: ``True``
  1828. If ``multiprocessing`` is enabled when a minion receives a
  1829. publication a new process is spawned and the command is executed therein.
  1830. Conversely, if ``multiprocessing`` is disabled the new publication will be run
  1831. executed in a thread.
  1832. .. code-block:: yaml
  1833. multiprocessing: True
  1834. .. conf_minion:: process_count_max
  1835. ``process_count_max``
  1836. ---------------------
  1837. .. versionadded:: 2018.3.0
  1838. Default: ``-1``
  1839. Limit the maximum amount of processes or threads created by ``salt-minion``.
  1840. This is useful to avoid resource exhaustion in case the minion receives more
  1841. publications than it is able to handle, as it limits the number of spawned
  1842. processes or threads. ``-1`` is the default and disables the limit.
  1843. .. code-block:: yaml
  1844. process_count_max: -1
  1845. .. _minion-logging-settings:
  1846. Minion Logging Settings
  1847. =======================
  1848. .. conf_minion:: log_file
  1849. ``log_file``
  1850. ------------
  1851. Default: ``/var/log/salt/minion``
  1852. The minion log can be sent to a regular file, local path name, or network
  1853. location. See also :conf_log:`log_file`.
  1854. Examples:
  1855. .. code-block:: yaml
  1856. log_file: /var/log/salt/minion
  1857. .. code-block:: yaml
  1858. log_file: file:///dev/log
  1859. .. code-block:: yaml
  1860. log_file: udp://loghost:10514
  1861. .. conf_minion:: log_level
  1862. ``log_level``
  1863. -------------
  1864. Default: ``warning``
  1865. The level of messages to send to the console. See also :conf_log:`log_level`.
  1866. .. code-block:: yaml
  1867. log_level: warning
  1868. .. conf_minion:: log_level_logfile
  1869. ``log_level_logfile``
  1870. ---------------------
  1871. Default: ``warning``
  1872. The level of messages to send to the log file. See also
  1873. :conf_log:`log_level_logfile`. When it is not set explicitly
  1874. it will inherit the level set by :conf_log:`log_level` option.
  1875. .. code-block:: yaml
  1876. log_level_logfile: warning
  1877. .. conf_minion:: log_datefmt
  1878. ``log_datefmt``
  1879. ---------------
  1880. Default: ``%H:%M:%S``
  1881. The date and time format used in console log messages. See also
  1882. :conf_log:`log_datefmt`.
  1883. .. code-block:: yaml
  1884. log_datefmt: '%H:%M:%S'
  1885. .. conf_minion:: log_datefmt_logfile
  1886. ``log_datefmt_logfile``
  1887. -----------------------
  1888. Default: ``%Y-%m-%d %H:%M:%S``
  1889. The date and time format used in log file messages. See also
  1890. :conf_log:`log_datefmt_logfile`.
  1891. .. code-block:: yaml
  1892. log_datefmt_logfile: '%Y-%m-%d %H:%M:%S'
  1893. .. conf_minion:: log_fmt_console
  1894. ``log_fmt_console``
  1895. -------------------
  1896. Default: ``[%(levelname)-8s] %(message)s``
  1897. The format of the console logging messages. See also
  1898. :conf_log:`log_fmt_console`.
  1899. .. note::
  1900. Log colors are enabled in ``log_fmt_console`` rather than the
  1901. :conf_minion:`color` config since the logging system is loaded before the
  1902. minion config.
  1903. Console log colors are specified by these additional formatters:
  1904. %(colorlevel)s
  1905. %(colorname)s
  1906. %(colorprocess)s
  1907. %(colormsg)s
  1908. Since it is desirable to include the surrounding brackets, '[' and ']', in
  1909. the coloring of the messages, these color formatters also include padding
  1910. as well. Color LogRecord attributes are only available for console
  1911. logging.
  1912. .. code-block:: yaml
  1913. log_fmt_console: '%(colorlevel)s %(colormsg)s'
  1914. log_fmt_console: '[%(levelname)-8s] %(message)s'
  1915. .. conf_minion:: log_fmt_logfile
  1916. ``log_fmt_logfile``
  1917. -------------------
  1918. Default: ``%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s``
  1919. The format of the log file logging messages. See also
  1920. :conf_log:`log_fmt_logfile`.
  1921. .. code-block:: yaml
  1922. log_fmt_logfile: '%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s'
  1923. .. conf_minion:: log_granular_levels
  1924. ``log_granular_levels``
  1925. -----------------------
  1926. Default: ``{}``
  1927. This can be used to control logging levels more specifically. See also
  1928. :conf_log:`log_granular_levels`.
  1929. .. conf_minion:: log_rotate_max_bytes
  1930. ``log_rotate_max_bytes``
  1931. ------------------------
  1932. Default: ``0``
  1933. The maximum number of bytes a single log file may contain before it is rotated.
  1934. A value of 0 disables this feature. Currently only supported on Windows. On
  1935. other platforms, use an external tool such as 'logrotate' to manage log files.
  1936. :conf_log:`log_rotate_max_bytes`
  1937. .. conf_minion:: log_rotate_backup_count
  1938. ``log_rotate_backup_count``
  1939. ---------------------------
  1940. Default: ``0``
  1941. The number of backup files to keep when rotating log files. Only used if
  1942. :conf_minion:`log_rotate_max_bytes` is greater than 0. Currently only supported
  1943. on Windows. On other platforms, use an external tool such as 'logrotate' to
  1944. manage log files.
  1945. :conf_log:`log_rotate_backup_count`
  1946. .. conf_minion:: zmq_monitor
  1947. ``zmq_monitor``
  1948. ---------------
  1949. Default: ``False``
  1950. To diagnose issues with minions disconnecting or missing returns, ZeroMQ
  1951. supports the use of monitor sockets to log connection events. This
  1952. feature requires ZeroMQ 4.0 or higher.
  1953. To enable ZeroMQ monitor sockets, set 'zmq_monitor' to 'True' and log at a
  1954. debug level or higher.
  1955. A sample log event is as follows:
  1956. .. code-block:: yaml
  1957. [DEBUG ] ZeroMQ event: {'endpoint': 'tcp://127.0.0.1:4505', 'event': 512,
  1958. 'value': 27, 'description': 'EVENT_DISCONNECTED'}
  1959. All events logged will include the string ``ZeroMQ event``. A connection event
  1960. should be logged as the minion starts up and initially connects to the
  1961. master. If not, check for debug log level and that the necessary version of
  1962. ZeroMQ is installed.
  1963. .. conf_minion:: failhard
  1964. ``tcp_authentication_retries``
  1965. ------------------------------
  1966. Default: ``5``
  1967. The number of times to retry authenticating with the salt master when it comes
  1968. back online.
  1969. Zeromq does a lot to make sure when connections come back online that they
  1970. reauthenticate. The tcp transport should try to connect with a new connection
  1971. if the old one times out on reauthenticating.
  1972. `-1` for infinite tries.
  1973. ``failhard``
  1974. ------------
  1975. Default: ``False``
  1976. Set the global failhard flag. This informs all states to stop running states
  1977. at the moment a single state fails
  1978. .. code-block:: yaml
  1979. failhard: False
  1980. Include Configuration
  1981. =====================
  1982. Configuration can be loaded from multiple files. The order in which this is
  1983. done is:
  1984. 1. The minion config file itself
  1985. 2. The files matching the glob in :conf_minion:`default_include`
  1986. 3. The files matching the glob in :conf_minion:`include` (if defined)
  1987. Each successive step overrides any values defined in the previous steps.
  1988. Therefore, any config options defined in one of the
  1989. :conf_minion:`default_include` files would override the same value in the
  1990. minion config file, and any options defined in :conf_minion:`include` would
  1991. override both.
  1992. .. conf_minion:: default_include
  1993. ``default_include``
  1994. -------------------
  1995. Default: ``minion.d/*.conf``
  1996. The minion can include configuration from other files. Per default the
  1997. minion will automatically include all config files from `minion.d/*.conf`
  1998. where minion.d is relative to the directory of the minion configuration
  1999. file.
  2000. .. note::
  2001. Salt creates files in the ``minion.d`` directory for its own use. These
  2002. files are prefixed with an underscore. A common example of this is the
  2003. ``_schedule.conf`` file.
  2004. .. conf_minion:: include
  2005. ``include``
  2006. -----------
  2007. Default: ``not defined``
  2008. The minion can include configuration from other files. To enable this,
  2009. pass a list of paths to this option. The paths can be either relative or
  2010. absolute; if relative, they are considered to be relative to the directory
  2011. the main minion configuration file lives in. Paths can make use of
  2012. shell-style globbing. If no files are matched by a path passed to this
  2013. option then the minion will log a warning message.
  2014. .. code-block:: yaml
  2015. # Include files from a minion.d directory in the same
  2016. # directory as the minion config file
  2017. include: minion.d/*.conf
  2018. # Include a single extra file into the configuration
  2019. include: /etc/roles/webserver
  2020. # Include several files and the minion.d directory
  2021. include:
  2022. - extra_config
  2023. - minion.d/*
  2024. - /etc/roles/webserver
  2025. Keepalive Settings
  2026. ==================
  2027. .. conf_minion:: tcp_keepalive
  2028. ``tcp_keepalive``
  2029. -----------------
  2030. Default: ``True``
  2031. The tcp keepalive interval to set on TCP ports. This setting can be used to tune Salt
  2032. connectivity issues in messy network environments with misbehaving firewalls.
  2033. .. code-block:: yaml
  2034. tcp_keepalive: True
  2035. .. conf_minion:: tcp_keepalive_cnt
  2036. ``tcp_keepalive_cnt``
  2037. ---------------------
  2038. Default: ``-1``
  2039. Sets the ZeroMQ TCP keepalive count. May be used to tune issues with minion disconnects.
  2040. .. code-block:: yaml
  2041. tcp_keepalive_cnt: -1
  2042. .. conf_minion:: tcp_keepalive_idle
  2043. ``tcp_keepalive_idle``
  2044. ----------------------
  2045. Default: ``300``
  2046. Sets ZeroMQ TCP keepalive idle. May be used to tune issues with minion disconnects.
  2047. .. code-block:: yaml
  2048. tcp_keepalive_idle: 300
  2049. .. conf_minion:: tcp_keepalive_intvl
  2050. ``tcp_keepalive_intvl``
  2051. -----------------------
  2052. Default: ``-1``
  2053. Sets ZeroMQ TCP keepalive interval. May be used to tune issues with minion disconnects.
  2054. .. code-block:: yaml
  2055. tcp_keepalive_intvl': -1
  2056. Frozen Build Update Settings
  2057. ============================
  2058. These options control how :py:func:`salt.modules.saltutil.update` works with esky
  2059. frozen apps. For more information look at `<https://github.com/cloudmatrix/esky/>`_.
  2060. .. conf_minion:: update_url
  2061. ``update_url``
  2062. --------------
  2063. Default: ``False`` (Update feature is disabled)
  2064. The url to use when looking for application updates. Esky depends on directory
  2065. listings to search for new versions. A webserver running on your Master is a
  2066. good starting point for most setups.
  2067. .. code-block:: yaml
  2068. update_url: 'http://salt.example.com/minion-updates'
  2069. .. conf_minion:: update_restart_services
  2070. ``update_restart_services``
  2071. ---------------------------
  2072. Default: ``[]`` (service restarting on update is disabled)
  2073. A list of services to restart when the minion software is updated. This would
  2074. typically just be a list containing the minion's service name, but you may
  2075. have other services that need to go with it.
  2076. .. code-block:: yaml
  2077. update_restart_services: ['salt-minion']
  2078. .. conf_minion:: winrepo_cache_expire_min
  2079. ``winrepo_cache_expire_min``
  2080. ----------------------------
  2081. .. versionadded:: 2016.11.0
  2082. Default: ``1800``
  2083. If set to a nonzero integer, then passing ``refresh=True`` to functions in the
  2084. :mod:`windows pkg module <salt.modules.win_pkg>` will not refresh the windows
  2085. repo metadata if the age of the metadata is less than this value. The exception
  2086. to this is :py:func:`pkg.refresh_db <salt.modules.win_pkg.refresh_db>`, which
  2087. will always refresh the metadata, regardless of age.
  2088. .. code-block:: yaml
  2089. winrepo_cache_expire_min: 1800
  2090. .. conf_minion:: winrepo_cache_expire_max
  2091. ``winrepo_cache_expire_max``
  2092. ----------------------------
  2093. .. versionadded:: 2016.11.0
  2094. Default: ``21600``
  2095. If the windows repo metadata is older than this value, and the metadata is
  2096. needed by a function in the :mod:`windows pkg module <salt.modules.win_pkg>`,
  2097. the metadata will be refreshed.
  2098. .. code-block:: yaml
  2099. winrepo_cache_expire_max: 86400
  2100. .. _winrepo-minion-config-opts:
  2101. Minion Windows Software Repo Settings
  2102. =====================================
  2103. .. important::
  2104. To use these config options, the minion can be running in master-minion or
  2105. masterless mode.
  2106. .. conf_minion:: winrepo_source_dir
  2107. ``winrepo_source_dir``
  2108. ----------------------
  2109. Default: ``salt://win/repo-ng/``
  2110. The source location for the winrepo sls files.
  2111. .. code-block:: yaml
  2112. winrepo_source_dir: salt://win/repo-ng/
  2113. Standalone Minion Windows Software Repo Settings
  2114. ================================================
  2115. .. important::
  2116. To use these config options, the minion must be running in masterless mode
  2117. (set :conf_minion:`file_client` to ``local``).
  2118. .. conf_minion:: winrepo_dir
  2119. .. conf_minion:: win_repo
  2120. ``winrepo_dir``
  2121. ---------------
  2122. .. versionchanged:: 2015.8.0
  2123. Renamed from ``win_repo`` to ``winrepo_dir``. Also, this option did not
  2124. have a default value until this version.
  2125. Default: ``C:\salt\srv\salt\win\repo``
  2126. Location on the minion where the :conf_minion:`winrepo_remotes` are checked
  2127. out.
  2128. .. code-block:: yaml
  2129. winrepo_dir: 'D:\winrepo'
  2130. .. conf_minion:: winrepo_dir_ng
  2131. ``winrepo_dir_ng``
  2132. ------------------
  2133. .. versionadded:: 2015.8.0
  2134. A new :ref:`ng <windows-package-manager>` repo was added.
  2135. Default: ``/srv/salt/win/repo-ng``
  2136. Location on the minion where the :conf_minion:`winrepo_remotes_ng` are checked
  2137. out for 2015.8.0 and later minions.
  2138. .. code-block:: yaml
  2139. winrepo_dir_ng: /srv/salt/win/repo-ng
  2140. .. conf_minion:: winrepo_cachefile
  2141. .. conf_minion:: win_repo_cachefile
  2142. ``winrepo_cachefile``
  2143. ---------------------
  2144. .. versionchanged:: 2015.8.0
  2145. Renamed from ``win_repo_cachefile`` to ``winrepo_cachefile``. Also,
  2146. this option did not have a default value until this version.
  2147. Default: ``winrepo.p``
  2148. Path relative to :conf_minion:`winrepo_dir` where the winrepo cache should be
  2149. created.
  2150. .. code-block:: yaml
  2151. winrepo_cachefile: winrepo.p
  2152. .. conf_minion:: winrepo_remotes
  2153. .. conf_minion:: win_gitrepos
  2154. ``winrepo_remotes``
  2155. -------------------
  2156. .. versionchanged:: 2015.8.0
  2157. Renamed from ``win_gitrepos`` to ``winrepo_remotes``. Also, this option did
  2158. not have a default value until this version.
  2159. .. versionadded:: 2015.8.0
  2160. Default: ``['https://github.com/saltstack/salt-winrepo.git']``
  2161. List of git repositories to checkout and include in the winrepo
  2162. .. code-block:: yaml
  2163. winrepo_remotes:
  2164. - https://github.com/saltstack/salt-winrepo.git
  2165. To specify a specific revision of the repository, prepend a commit ID to the
  2166. URL of the repository:
  2167. .. code-block:: yaml
  2168. winrepo_remotes:
  2169. - '<commit_id> https://github.com/saltstack/salt-winrepo.git'
  2170. Replace ``<commit_id>`` with the SHA1 hash of a commit ID. Specifying a commit
  2171. ID is useful in that it allows one to revert back to a previous version in the
  2172. event that an error is introduced in the latest revision of the repo.
  2173. .. conf_minion:: winrepo_remotes_ng
  2174. ``winrepo_remotes_ng``
  2175. ----------------------
  2176. .. versionadded:: 2015.8.0
  2177. A new :ref:`ng <windows-package-manager>` repo was added.
  2178. Default: ``['https://github.com/saltstack/salt-winrepo-ng.git']``
  2179. List of git repositories to checkout and include in the winrepo for
  2180. 2015.8.0 and later minions.
  2181. .. code-block:: yaml
  2182. winrepo_remotes_ng:
  2183. - https://github.com/saltstack/salt-winrepo-ng.git
  2184. To specify a specific revision of the repository, prepend a commit ID to the
  2185. URL of the repository:
  2186. .. code-block:: yaml
  2187. winrepo_remotes_ng:
  2188. - '<commit_id> https://github.com/saltstack/salt-winrepo-ng.git'
  2189. Replace ``<commit_id>`` with the SHA1 hash of a commit ID. Specifying a commit
  2190. ID is useful in that it allows one to revert back to a previous version in the
  2191. event that an error is introduced in the latest revision of the repo.
  2192. ``ssh_merge_pillar``
  2193. --------------------
  2194. .. versionadded:: 2018.3.2
  2195. Default: ``True``
  2196. Merges the compiled pillar data with the pillar data already available globally.
  2197. This is useful when using ``salt-ssh`` or ``salt-call --local`` and overriding the pillar
  2198. data in a state file:
  2199. .. code-block:: yaml
  2200. apply_showpillar:
  2201. module.run:
  2202. - name: state.apply
  2203. - mods:
  2204. - showpillar
  2205. - kwargs:
  2206. pillar:
  2207. test: "foo bar"
  2208. If set to ``True`` the ``showpillar`` state will have access to the
  2209. global pillar data.
  2210. If set to ``False`` only the overriding pillar data will be available
  2211. to the ``showpillar`` state.