1
0

minion.rst 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573
  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:: Neon
  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:: Neon
  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:: top_file
  1292. ``top_file``
  1293. ------------
  1294. Default: ``''``
  1295. Top file to execute if ``startup_states`` is set to ``top``.
  1296. .. code-block:: yaml
  1297. top_file: ''
  1298. State Management Settings
  1299. =========================
  1300. .. conf_minion:: renderer
  1301. ``renderer``
  1302. ------------
  1303. Default: ``jinja|yaml``
  1304. The default renderer used for local state executions
  1305. .. code-block:: yaml
  1306. renderer: jinja|json
  1307. .. conf_minion:: test
  1308. ``test``
  1309. --------
  1310. Default: ``False``
  1311. Set all state calls to only test if they are going to actually make changes
  1312. or just post what changes are going to be made.
  1313. .. code-block:: yaml
  1314. test: False
  1315. .. conf_minion:: state_verbose
  1316. ``state_verbose``
  1317. -----------------
  1318. Default: ``True``
  1319. Controls the verbosity of state runs. By default, the results of all states are
  1320. returned, but setting this value to ``False`` will cause salt to only display
  1321. output for states that failed or states that have changes.
  1322. .. code-block:: yaml
  1323. state_verbose: True
  1324. .. conf_minion:: state_output
  1325. ``state_output``
  1326. ----------------
  1327. Default: ``full``
  1328. The state_output setting controls which results will be output full multi line:
  1329. * ``full``, ``terse`` - each state will be full/terse
  1330. * ``mixed`` - only states with errors will be full
  1331. * ``changes`` - states with changes and errors will be full
  1332. ``full_id``, ``mixed_id``, ``changes_id`` and ``terse_id`` are also allowed;
  1333. when set, the state ID will be used as name in the output.
  1334. .. code-block:: yaml
  1335. state_output: full
  1336. .. conf_minion:: state_output_diff
  1337. ``state_output_diff``
  1338. ---------------------
  1339. Default: ``False``
  1340. The state_output_diff setting changes whether or not the output from
  1341. successful states is returned. Useful when even the terse output of these
  1342. states is cluttering the logs. Set it to True to ignore them.
  1343. .. code-block:: yaml
  1344. state_output_diff: False
  1345. .. conf_minion:: autoload_dynamic_modules
  1346. ``autoload_dynamic_modules``
  1347. ----------------------------
  1348. Default: ``True``
  1349. autoload_dynamic_modules turns on automatic loading of modules found in the
  1350. environments on the master. This is turned on by default. To turn off
  1351. auto-loading modules when states run, set this value to ``False``.
  1352. .. code-block:: yaml
  1353. autoload_dynamic_modules: True
  1354. .. conf_minion:: clean_dynamic_modules
  1355. Default: ``True``
  1356. clean_dynamic_modules keeps the dynamic modules on the minion in sync with
  1357. the dynamic modules on the master. This means that if a dynamic module is
  1358. not on the master it will be deleted from the minion. By default this is
  1359. enabled and can be disabled by changing this value to ``False``.
  1360. .. code-block:: yaml
  1361. clean_dynamic_modules: True
  1362. .. note::
  1363. If ``extmod_whitelist`` is specified, modules which are not whitelisted will also be cleaned here.
  1364. .. conf_minion:: environment
  1365. .. conf_minion:: saltenv
  1366. ``saltenv``
  1367. -----------
  1368. .. versionchanged:: 2018.3.0
  1369. Renamed from ``environment`` to ``saltenv``. If ``environment`` is used,
  1370. ``saltenv`` will take its value. If both are used, ``environment`` will be
  1371. ignored and ``saltenv`` will be used.
  1372. Normally the minion is not isolated to any single environment on the master
  1373. when running states, but the environment can be isolated on the minion side
  1374. by statically setting it. Remember that the recommended way to manage
  1375. environments is to isolate via the top file.
  1376. .. code-block:: yaml
  1377. saltenv: dev
  1378. .. conf_minion:: lock_saltenv
  1379. ``lock_saltenv``
  1380. ----------------
  1381. .. versionadded:: 2018.3.0
  1382. Default: ``False``
  1383. For purposes of running states, this option prevents using the ``saltenv``
  1384. argument to manually set the environment. This is useful to keep a minion which
  1385. has the :conf_minion:`saltenv` option set to ``dev`` from running states from
  1386. an environment other than ``dev``.
  1387. .. code-block:: yaml
  1388. lock_saltenv: True
  1389. .. conf_minion:: snapper_states
  1390. ``snapper_states``
  1391. ------------------
  1392. Default: False
  1393. The `snapper_states` value is used to enable taking snapper snapshots before
  1394. and after salt state runs. This allows for state runs to be rolled back.
  1395. For snapper states to function properly snapper needs to be installed and
  1396. enabled.
  1397. .. code-block:: yaml
  1398. snapper_states: True
  1399. .. conf_minion:: snapper_states_config
  1400. ``snapper_states_config``
  1401. -------------------------
  1402. Default: ``root``
  1403. Snapper can execute based on a snapper configuration. The configuration
  1404. needs to be set up before snapper can use it. The default configuration
  1405. is ``root``, this default makes snapper run on SUSE systems using the
  1406. default configuration set up at install time.
  1407. .. code-block:: yaml
  1408. snapper_states_config: root
  1409. File Directory Settings
  1410. =======================
  1411. .. conf_minion:: file_client
  1412. ``file_client``
  1413. ---------------
  1414. Default: ``remote``
  1415. The client defaults to looking on the master server for files, but can be
  1416. directed to look on the minion by setting this parameter to ``local``.
  1417. .. code-block:: yaml
  1418. file_client: remote
  1419. .. conf_minion:: use_master_when_local
  1420. ``use_master_when_local``
  1421. -------------------------
  1422. Default: ``False``
  1423. When using a local :conf_minion:`file_client`, this parameter is used to allow
  1424. the client to connect to a master for remote execution.
  1425. .. code-block:: yaml
  1426. use_master_when_local: False
  1427. .. conf_minion:: file_roots
  1428. ``file_roots``
  1429. --------------
  1430. Default:
  1431. .. code-block:: yaml
  1432. base:
  1433. - /srv/salt
  1434. When using a local :conf_minion:`file_client`, this parameter is used to setup
  1435. the fileserver's environments. This parameter operates identically to the
  1436. :conf_master:`master config parameter <file_roots>` of the same name.
  1437. .. code-block:: yaml
  1438. file_roots:
  1439. base:
  1440. - /srv/salt
  1441. dev:
  1442. - /srv/salt/dev/services
  1443. - /srv/salt/dev/states
  1444. prod:
  1445. - /srv/salt/prod/services
  1446. - /srv/salt/prod/states
  1447. .. conf_minion:: fileserver_followsymlinks
  1448. ``fileserver_followsymlinks``
  1449. -----------------------------
  1450. .. versionadded:: 2014.1.0
  1451. Default: ``True``
  1452. By default, the file_server follows symlinks when walking the filesystem tree.
  1453. Currently this only applies to the default roots fileserver_backend.
  1454. .. code-block:: yaml
  1455. fileserver_followsymlinks: True
  1456. .. conf_minion:: fileserver_ignoresymlinks
  1457. ``fileserver_ignoresymlinks``
  1458. -----------------------------
  1459. .. versionadded:: 2014.1.0
  1460. Default: ``False``
  1461. If you do not want symlinks to be treated as the files they are pointing to,
  1462. set ``fileserver_ignoresymlinks`` to ``True``. By default this is set to
  1463. False. When set to ``True``, any detected symlink while listing files on the
  1464. Master will not be returned to the Minion.
  1465. .. code-block:: yaml
  1466. fileserver_ignoresymlinks: False
  1467. .. conf_minion:: fileserver_limit_traversal
  1468. ``fileserver_limit_traversal``
  1469. ------------------------------
  1470. .. versionadded:: 2014.1.0
  1471. Default: ``False``
  1472. By default, the Salt fileserver recurses fully into all defined environments
  1473. to attempt to find files. To limit this behavior so that the fileserver only
  1474. traverses directories with SLS files and special Salt directories like _modules,
  1475. set ``fileserver_limit_traversal`` to ``True``. This might be useful for
  1476. installations where a file root has a very large number of files and performance
  1477. is impacted.
  1478. .. code-block:: yaml
  1479. fileserver_limit_traversal: False
  1480. .. conf_minion:: hash_type
  1481. ``hash_type``
  1482. -------------
  1483. Default: ``sha256``
  1484. The hash_type is the hash to use when discovering the hash of a file on the
  1485. local fileserver. The default is sha256, but md5, sha1, sha224, sha384, and
  1486. sha512 are also supported.
  1487. .. code-block:: yaml
  1488. hash_type: sha256
  1489. .. _pillar-configuration-minion:
  1490. Pillar Configuration
  1491. ====================
  1492. .. conf_minion:: pillar_roots
  1493. ``pillar_roots``
  1494. ----------------
  1495. Default:
  1496. .. code-block:: yaml
  1497. base:
  1498. - /srv/pillar
  1499. When using a local :conf_minion:`file_client`, this parameter is used to setup
  1500. the pillar environments.
  1501. .. code-block:: yaml
  1502. pillar_roots:
  1503. base:
  1504. - /srv/pillar
  1505. dev:
  1506. - /srv/pillar/dev
  1507. prod:
  1508. - /srv/pillar/prod
  1509. .. conf_minion:: on_demand_ext_pillar
  1510. ``on_demand_ext_pillar``
  1511. ------------------------
  1512. .. versionadded:: 2016.3.6,2016.11.3,2017.7.0
  1513. Default: ``['libvirt', 'virtkey']``
  1514. When using a local :conf_minion:`file_client`, this option controls which
  1515. external pillars are permitted to be used on-demand using :py:func:`pillar.ext
  1516. <salt.modules.pillar.ext>`.
  1517. .. code-block:: yaml
  1518. on_demand_ext_pillar:
  1519. - libvirt
  1520. - virtkey
  1521. - git
  1522. .. warning::
  1523. This will allow a masterless minion to request specific pillar data via
  1524. :py:func:`pillar.ext <salt.modules.pillar.ext>`, and may be considered a
  1525. security risk. However, pillar data generated in this way will not affect
  1526. the :ref:`in-memory pillar data <pillar-in-memory>`, so this risk is
  1527. limited to instances in which states/modules/etc. (built-in or custom) rely
  1528. upon pillar data generated by :py:func:`pillar.ext
  1529. <salt.modules.pillar.ext>`.
  1530. .. conf_minion:: decrypt_pillar
  1531. ``decrypt_pillar``
  1532. ------------------
  1533. .. versionadded:: 2017.7.0
  1534. Default: ``[]``
  1535. A list of paths to be recursively decrypted during pillar compilation.
  1536. .. code-block:: yaml
  1537. decrypt_pillar:
  1538. - 'foo:bar': gpg
  1539. - 'lorem:ipsum:dolor'
  1540. Entries in this list can be formatted either as a simple string, or as a
  1541. key/value pair, with the key being the pillar location, and the value being the
  1542. renderer to use for pillar decryption. If the former is used, the renderer
  1543. specified by :conf_minion:`decrypt_pillar_default` will be used.
  1544. .. conf_minion:: decrypt_pillar_delimiter
  1545. ``decrypt_pillar_delimiter``
  1546. ----------------------------
  1547. .. versionadded:: 2017.7.0
  1548. Default: ``:``
  1549. The delimiter used to distinguish nested data structures in the
  1550. :conf_minion:`decrypt_pillar` option.
  1551. .. code-block:: yaml
  1552. decrypt_pillar_delimiter: '|'
  1553. decrypt_pillar:
  1554. - 'foo|bar': gpg
  1555. - 'lorem|ipsum|dolor'
  1556. .. conf_minion:: decrypt_pillar_default
  1557. ``decrypt_pillar_default``
  1558. --------------------------
  1559. .. versionadded:: 2017.7.0
  1560. Default: ``gpg``
  1561. The default renderer used for decryption, if one is not specified for a given
  1562. pillar key in :conf_minion:`decrypt_pillar`.
  1563. .. code-block:: yaml
  1564. decrypt_pillar_default: my_custom_renderer
  1565. .. conf_minion:: decrypt_pillar_renderers
  1566. ``decrypt_pillar_renderers``
  1567. ----------------------------
  1568. .. versionadded:: 2017.7.0
  1569. Default: ``['gpg']``
  1570. List of renderers which are permitted to be used for pillar decryption.
  1571. .. code-block:: yaml
  1572. decrypt_pillar_renderers:
  1573. - gpg
  1574. - my_custom_renderer
  1575. .. conf_minion:: pillarenv
  1576. ``pillarenv``
  1577. -------------
  1578. Default: ``None``
  1579. Isolates the pillar environment on the minion side. This functions the same as
  1580. the environment setting, but for pillar instead of states.
  1581. .. code-block:: yaml
  1582. pillarenv: dev
  1583. .. conf_minion:: pillarenv_from_saltenv
  1584. ``pillarenv_from_saltenv``
  1585. --------------------------
  1586. .. versionadded:: 2017.7.0
  1587. Default: ``False``
  1588. When set to ``True``, the :conf_minion:`pillarenv` value will assume the value
  1589. of the effective saltenv when running states. This essentially makes ``salt '*'
  1590. state.sls mysls saltenv=dev`` equivalent to ``salt '*' state.sls mysls
  1591. saltenv=dev pillarenv=dev``. If :conf_minion:`pillarenv` is set, either in the
  1592. minion config file or via the CLI, it will override this option.
  1593. .. code-block:: yaml
  1594. pillarenv_from_saltenv: True
  1595. .. conf_minion:: pillar_raise_on_missing
  1596. ``pillar_raise_on_missing``
  1597. ---------------------------
  1598. .. versionadded:: 2015.5.0
  1599. Default: ``False``
  1600. Set this option to ``True`` to force a ``KeyError`` to be raised whenever an
  1601. attempt to retrieve a named value from pillar fails. When this option is set
  1602. to ``False``, the failed attempt returns an empty string.
  1603. .. conf_minion:: minion_pillar_cache
  1604. ``minion_pillar_cache``
  1605. -----------------------
  1606. .. versionadded:: 2016.3.0
  1607. Default: ``False``
  1608. The minion can locally cache rendered pillar data under
  1609. :conf_minion:`cachedir`/pillar. This allows a temporarily disconnected minion
  1610. to access previously cached pillar data by invoking salt-call with the --local
  1611. and --pillar_root=:conf_minion:`cachedir`/pillar options. Before enabling this
  1612. setting consider that the rendered pillar may contain security sensitive data.
  1613. Appropriate access restrictions should be in place. By default the saved pillar
  1614. data will be readable only by the user account running salt. By default this
  1615. feature is disabled, to enable set minion_pillar_cache to ``True``.
  1616. .. code-block:: yaml
  1617. minion_pillar_cache: False
  1618. .. conf_minion:: file_recv_max_size
  1619. ``file_recv_max_size``
  1620. ----------------------
  1621. .. versionadded:: 2014.7.0
  1622. Default: ``100``
  1623. Set a hard-limit on the size of the files that can be pushed to the master.
  1624. It will be interpreted as megabytes.
  1625. .. code-block:: yaml
  1626. file_recv_max_size: 100
  1627. .. conf_minion:: pass_to_ext_pillars
  1628. ``pass_to_ext_pillars``
  1629. -----------------------
  1630. Specify a list of configuration keys whose values are to be passed to
  1631. external pillar functions.
  1632. Suboptions can be specified using the ':' notation (i.e. ``option:suboption``)
  1633. The values are merged and included in the ``extra_minion_data`` optional
  1634. parameter of the external pillar function. The ``extra_minion_data`` parameter
  1635. is passed only to the external pillar functions that have it explicitly
  1636. specified in their definition.
  1637. If the config contains
  1638. .. code-block:: yaml
  1639. opt1: value1
  1640. opt2:
  1641. subopt1: value2
  1642. subopt2: value3
  1643. pass_to_ext_pillars:
  1644. - opt1
  1645. - opt2: subopt1
  1646. the ``extra_minion_data`` parameter will be
  1647. .. code-block:: python
  1648. {'opt1': 'value1',
  1649. 'opt2': {'subopt1': 'value2'}}
  1650. Security Settings
  1651. =================
  1652. .. conf_minion:: open_mode
  1653. ``open_mode``
  1654. -------------
  1655. Default: ``False``
  1656. Open mode can be used to clean out the PKI key received from the Salt master,
  1657. turn on open mode, restart the minion, then turn off open mode and restart the
  1658. minion to clean the keys.
  1659. .. code-block:: yaml
  1660. open_mode: False
  1661. .. conf_minion:: master_finger
  1662. ``master_finger``
  1663. -----------------
  1664. Default: ``''``
  1665. Fingerprint of the master public key to validate the identity of your Salt master
  1666. before the initial key exchange. The master fingerprint can be found by running
  1667. "salt-key -F master" on the Salt master.
  1668. .. code-block:: yaml
  1669. master_finger: 'ba:30:65:2a:d6:9e:20:4f:d8:b2:f3:a7:d4:65:11:13'
  1670. .. conf_minion:: keysize
  1671. ``keysize``
  1672. -----------
  1673. Default: ``2048``
  1674. The size of key that should be generated when creating new keys.
  1675. .. code-block:: yaml
  1676. keysize: 2048
  1677. .. conf_minion:: permissive_pki_access
  1678. ``permissive_pki_access``
  1679. -------------------------
  1680. Default: ``False``
  1681. Enable permissive access to the salt keys. This allows you to run the
  1682. master or minion as root, but have a non-root group be given access to
  1683. your pki_dir. To make the access explicit, root must belong to the group
  1684. you've given access to. This is potentially quite insecure.
  1685. .. code-block:: yaml
  1686. permissive_pki_access: False
  1687. .. conf_minion:: verify_master_pubkey_sign
  1688. ``verify_master_pubkey_sign``
  1689. -----------------------------
  1690. Default: ``False``
  1691. Enables verification of the master-public-signature returned by the master in
  1692. auth-replies. Please see the tutorial on how to configure this properly
  1693. `Multimaster-PKI with Failover Tutorial <http://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html>`_
  1694. .. versionadded:: 2014.7.0
  1695. .. code-block:: yaml
  1696. verify_master_pubkey_sign: True
  1697. If this is set to ``True``, :conf_master:`master_sign_pubkey` must be also set
  1698. to ``True`` in the master configuration file.
  1699. .. conf_minion:: master_sign_key_name
  1700. ``master_sign_key_name``
  1701. ------------------------
  1702. Default: ``master_sign``
  1703. The filename without the *.pub* suffix of the public key that should be used
  1704. for verifying the signature from the master. The file must be located in the
  1705. minion's pki directory.
  1706. .. versionadded:: 2014.7.0
  1707. .. code-block:: yaml
  1708. master_sign_key_name: <filename_without_suffix>
  1709. .. conf_minion:: autosign_grains
  1710. ``autosign_grains``
  1711. -------------------
  1712. .. versionadded:: 2018.3.0
  1713. Default: ``not defined``
  1714. The grains that should be sent to the master on authentication to decide if
  1715. the minion's key should be accepted automatically.
  1716. Please see the :ref:`Autoaccept Minions from Grains <tutorial-autoaccept-grains>`
  1717. documentation for more information.
  1718. .. code-block:: yaml
  1719. autosign_grains:
  1720. - uuid
  1721. - server_id
  1722. .. conf_minion:: always_verify_signature
  1723. ``always_verify_signature``
  1724. ---------------------------
  1725. Default: ``False``
  1726. If :conf_minion:`verify_master_pubkey_sign` is enabled, the signature is only verified
  1727. if the public-key of the master changes. If the signature should always be verified,
  1728. this can be set to ``True``.
  1729. .. versionadded:: 2014.7.0
  1730. .. code-block:: yaml
  1731. always_verify_signature: True
  1732. .. conf_minion:: cmd_blacklist_glob
  1733. ``cmd_blacklist_glob``
  1734. ----------------------
  1735. Default: ``[]``
  1736. If :conf_minion:`cmd_blacklist_glob` is enabled then any shell command called over
  1737. remote execution or via salt-call will be checked against the glob matches found in
  1738. the `cmd_blacklist_glob` list and any matched shell command will be blocked.
  1739. .. note::
  1740. This blacklist is only applied to direct executions made by the `salt` and
  1741. `salt-call` commands. This does NOT blacklist commands called from states
  1742. or shell commands executed from other modules.
  1743. .. versionadded:: 2016.11.0
  1744. .. code-block:: yaml
  1745. cmd_blacklist_glob:
  1746. - 'rm * '
  1747. - 'cat /etc/* '
  1748. .. conf_minion:: cmd_whitelist_glob
  1749. ``cmd_whitelist_glob``
  1750. ----------------------
  1751. Default: ``[]``
  1752. If :conf_minion:`cmd_whitelist_glob` is enabled then any shell command called over
  1753. remote execution or via salt-call will be checked against the glob matches found in
  1754. the `cmd_whitelist_glob` list and any shell command NOT found in the list will be
  1755. blocked. If `cmd_whitelist_glob` is NOT SET, then all shell commands are permitted.
  1756. .. note::
  1757. This whitelist is only applied to direct executions made by the `salt` and
  1758. `salt-call` commands. This does NOT restrict commands called from states
  1759. or shell commands executed from other modules.
  1760. .. versionadded:: 2016.11.0
  1761. .. code-block:: yaml
  1762. cmd_whitelist_glob:
  1763. - 'ls * '
  1764. - 'cat /etc/fstab'
  1765. .. conf_minion:: ssl
  1766. ``ssl``
  1767. -------
  1768. .. versionadded:: 2016.11.0
  1769. Default: ``None``
  1770. TLS/SSL connection options. This could be set to a dictionary containing
  1771. arguments corresponding to python ``ssl.wrap_socket`` method. For details see
  1772. `Tornado <http://www.tornadoweb.org/en/stable/tcpserver.html#tornado.tcpserver.TCPServer>`_
  1773. and `Python <http://docs.python.org/2/library/ssl.html#ssl.wrap_socket>`_
  1774. documentation.
  1775. Note: to set enum arguments values like ``cert_reqs`` and ``ssl_version`` use
  1776. constant names without ssl module prefix: ``CERT_REQUIRED`` or ``PROTOCOL_SSLv23``.
  1777. .. code-block:: yaml
  1778. ssl:
  1779. keyfile: <path_to_keyfile>
  1780. certfile: <path_to_certfile>
  1781. ssl_version: PROTOCOL_TLSv1_2
  1782. Reactor Settings
  1783. ================
  1784. .. conf_minion:: reactor
  1785. ``reactor``
  1786. -----------
  1787. Default: ``[]``
  1788. Defines a salt reactor. See the :ref:`Reactor <reactor>` documentation for more
  1789. information.
  1790. .. code-block:: yaml
  1791. reactor: []
  1792. .. conf_minion:: reactor_refresh_interval
  1793. ``reactor_refresh_interval``
  1794. ----------------------------
  1795. Default: ``60``
  1796. The TTL for the cache of the reactor configuration.
  1797. .. code-block:: yaml
  1798. reactor_refresh_interval: 60
  1799. .. conf_minion:: reactor_worker_threads
  1800. ``reactor_worker_threads``
  1801. --------------------------
  1802. Default: ``10``
  1803. The number of workers for the runner/wheel in the reactor.
  1804. .. code-block:: yaml
  1805. reactor_worker_threads: 10
  1806. .. conf_minion:: reactor_worker_hwm
  1807. ``reactor_worker_hwm``
  1808. ----------------------
  1809. Default: ``10000``
  1810. The queue size for workers in the reactor.
  1811. .. code-block:: yaml
  1812. reactor_worker_hwm: 10000
  1813. Thread Settings
  1814. ===============
  1815. .. conf_minion:: multiprocessing
  1816. ``multiprocessing``
  1817. -------------------
  1818. Default: ``True``
  1819. If ``multiprocessing`` is enabled when a minion receives a
  1820. publication a new process is spawned and the command is executed therein.
  1821. Conversely, if ``multiprocessing`` is disabled the new publication will be run
  1822. executed in a thread.
  1823. .. code-block:: yaml
  1824. multiprocessing: True
  1825. .. conf_minion:: process_count_max
  1826. ``process_count_max``
  1827. ---------------------
  1828. .. versionadded:: 2018.3.0
  1829. Default: ``-1``
  1830. Limit the maximum amount of processes or threads created by ``salt-minion``.
  1831. This is useful to avoid resource exhaustion in case the minion receives more
  1832. publications than it is able to handle, as it limits the number of spawned
  1833. processes or threads. ``-1`` is the default and disables the limit.
  1834. .. code-block:: yaml
  1835. process_count_max: -1
  1836. .. _minion-logging-settings:
  1837. Minion Logging Settings
  1838. =======================
  1839. .. conf_minion:: log_file
  1840. ``log_file``
  1841. ------------
  1842. Default: ``/var/log/salt/minion``
  1843. The minion log can be sent to a regular file, local path name, or network
  1844. location. See also :conf_log:`log_file`.
  1845. Examples:
  1846. .. code-block:: yaml
  1847. log_file: /var/log/salt/minion
  1848. .. code-block:: yaml
  1849. log_file: file:///dev/log
  1850. .. code-block:: yaml
  1851. log_file: udp://loghost:10514
  1852. .. conf_minion:: log_level
  1853. ``log_level``
  1854. -------------
  1855. Default: ``warning``
  1856. The level of messages to send to the console. See also :conf_log:`log_level`.
  1857. .. code-block:: yaml
  1858. log_level: warning
  1859. .. conf_minion:: log_level_logfile
  1860. ``log_level_logfile``
  1861. ---------------------
  1862. Default: ``warning``
  1863. The level of messages to send to the log file. See also
  1864. :conf_log:`log_level_logfile`. When it is not set explicitly
  1865. it will inherit the level set by :conf_log:`log_level` option.
  1866. .. code-block:: yaml
  1867. log_level_logfile: warning
  1868. .. conf_minion:: log_datefmt
  1869. ``log_datefmt``
  1870. ---------------
  1871. Default: ``%H:%M:%S``
  1872. The date and time format used in console log messages. See also
  1873. :conf_log:`log_datefmt`.
  1874. .. code-block:: yaml
  1875. log_datefmt: '%H:%M:%S'
  1876. .. conf_minion:: log_datefmt_logfile
  1877. ``log_datefmt_logfile``
  1878. -----------------------
  1879. Default: ``%Y-%m-%d %H:%M:%S``
  1880. The date and time format used in log file messages. See also
  1881. :conf_log:`log_datefmt_logfile`.
  1882. .. code-block:: yaml
  1883. log_datefmt_logfile: '%Y-%m-%d %H:%M:%S'
  1884. .. conf_minion:: log_fmt_console
  1885. ``log_fmt_console``
  1886. -------------------
  1887. Default: ``[%(levelname)-8s] %(message)s``
  1888. The format of the console logging messages. See also
  1889. :conf_log:`log_fmt_console`.
  1890. .. note::
  1891. Log colors are enabled in ``log_fmt_console`` rather than the
  1892. :conf_minion:`color` config since the logging system is loaded before the
  1893. minion config.
  1894. Console log colors are specified by these additional formatters:
  1895. %(colorlevel)s
  1896. %(colorname)s
  1897. %(colorprocess)s
  1898. %(colormsg)s
  1899. Since it is desirable to include the surrounding brackets, '[' and ']', in
  1900. the coloring of the messages, these color formatters also include padding
  1901. as well. Color LogRecord attributes are only available for console
  1902. logging.
  1903. .. code-block:: yaml
  1904. log_fmt_console: '%(colorlevel)s %(colormsg)s'
  1905. log_fmt_console: '[%(levelname)-8s] %(message)s'
  1906. .. conf_minion:: log_fmt_logfile
  1907. ``log_fmt_logfile``
  1908. -------------------
  1909. Default: ``%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s``
  1910. The format of the log file logging messages. See also
  1911. :conf_log:`log_fmt_logfile`.
  1912. .. code-block:: yaml
  1913. log_fmt_logfile: '%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s'
  1914. .. conf_minion:: log_granular_levels
  1915. ``log_granular_levels``
  1916. -----------------------
  1917. Default: ``{}``
  1918. This can be used to control logging levels more specifically. See also
  1919. :conf_log:`log_granular_levels`.
  1920. .. conf_minion:: log_rotate_max_bytes
  1921. ``log_rotate_max_bytes``
  1922. ------------------------
  1923. Default: ``0``
  1924. The maximum number of bytes a single log file may contain before it is rotated.
  1925. A value of 0 disables this feature. Currently only supported on Windows. On
  1926. other platforms, use an external tool such as 'logrotate' to manage log files.
  1927. :conf_log:`log_rotate_max_bytes`
  1928. .. conf_minion:: log_rotate_backup_count
  1929. ``log_rotate_backup_count``
  1930. ---------------------------
  1931. Default: ``0``
  1932. The number of backup files to keep when rotating log files. Only used if
  1933. :conf_minion:`log_rotate_max_bytes` is greater than 0. Currently only supported
  1934. on Windows. On other platforms, use an external tool such as 'logrotate' to
  1935. manage log files.
  1936. :conf_log:`log_rotate_backup_count`
  1937. .. conf_minion:: zmq_monitor
  1938. ``zmq_monitor``
  1939. ---------------
  1940. Default: ``False``
  1941. To diagnose issues with minions disconnecting or missing returns, ZeroMQ
  1942. supports the use of monitor sockets to log connection events. This
  1943. feature requires ZeroMQ 4.0 or higher.
  1944. To enable ZeroMQ monitor sockets, set 'zmq_monitor' to 'True' and log at a
  1945. debug level or higher.
  1946. A sample log event is as follows:
  1947. .. code-block:: yaml
  1948. [DEBUG ] ZeroMQ event: {'endpoint': 'tcp://127.0.0.1:4505', 'event': 512,
  1949. 'value': 27, 'description': 'EVENT_DISCONNECTED'}
  1950. All events logged will include the string ``ZeroMQ event``. A connection event
  1951. should be logged as the minion starts up and initially connects to the
  1952. master. If not, check for debug log level and that the necessary version of
  1953. ZeroMQ is installed.
  1954. .. conf_minion:: failhard
  1955. ``tcp_authentication_retries``
  1956. ------------------------------
  1957. Default: ``5``
  1958. The number of times to retry authenticating with the salt master when it comes
  1959. back online.
  1960. Zeromq does a lot to make sure when connections come back online that they
  1961. reauthenticate. The tcp transport should try to connect with a new connection
  1962. if the old one times out on reauthenticating.
  1963. `-1` for infinite tries.
  1964. ``failhard``
  1965. ------------
  1966. Default: ``False``
  1967. Set the global failhard flag. This informs all states to stop running states
  1968. at the moment a single state fails
  1969. .. code-block:: yaml
  1970. failhard: False
  1971. Include Configuration
  1972. =====================
  1973. Configuration can be loaded from multiple files. The order in which this is
  1974. done is:
  1975. 1. The minion config file itself
  1976. 2. The files matching the glob in :conf_minion:`default_include`
  1977. 3. The files matching the glob in :conf_minion:`include` (if defined)
  1978. Each successive step overrides any values defined in the previous steps.
  1979. Therefore, any config options defined in one of the
  1980. :conf_minion:`default_include` files would override the same value in the
  1981. minion config file, and any options defined in :conf_minion:`include` would
  1982. override both.
  1983. .. conf_minion:: default_include
  1984. ``default_include``
  1985. -------------------
  1986. Default: ``minion.d/*.conf``
  1987. The minion can include configuration from other files. Per default the
  1988. minion will automatically include all config files from `minion.d/*.conf`
  1989. where minion.d is relative to the directory of the minion configuration
  1990. file.
  1991. .. note::
  1992. Salt creates files in the ``minion.d`` directory for its own use. These
  1993. files are prefixed with an underscore. A common example of this is the
  1994. ``_schedule.conf`` file.
  1995. .. conf_minion:: include
  1996. ``include``
  1997. -----------
  1998. Default: ``not defined``
  1999. The minion can include configuration from other files. To enable this,
  2000. pass a list of paths to this option. The paths can be either relative or
  2001. absolute; if relative, they are considered to be relative to the directory
  2002. the main minion configuration file lives in. Paths can make use of
  2003. shell-style globbing. If no files are matched by a path passed to this
  2004. option then the minion will log a warning message.
  2005. .. code-block:: yaml
  2006. # Include files from a minion.d directory in the same
  2007. # directory as the minion config file
  2008. include: minion.d/*.conf
  2009. # Include a single extra file into the configuration
  2010. include: /etc/roles/webserver
  2011. # Include several files and the minion.d directory
  2012. include:
  2013. - extra_config
  2014. - minion.d/*
  2015. - /etc/roles/webserver
  2016. Keepalive Settings
  2017. ==================
  2018. .. conf_minion:: tcp_keepalive
  2019. ``tcp_keepalive``
  2020. -----------------
  2021. Default: ``True``
  2022. The tcp keepalive interval to set on TCP ports. This setting can be used to tune Salt
  2023. connectivity issues in messy network environments with misbehaving firewalls.
  2024. .. code-block:: yaml
  2025. tcp_keepalive: True
  2026. .. conf_minion:: tcp_keepalive_cnt
  2027. ``tcp_keepalive_cnt``
  2028. ---------------------
  2029. Default: ``-1``
  2030. Sets the ZeroMQ TCP keepalive count. May be used to tune issues with minion disconnects.
  2031. .. code-block:: yaml
  2032. tcp_keepalive_cnt: -1
  2033. .. conf_minion:: tcp_keepalive_idle
  2034. ``tcp_keepalive_idle``
  2035. ----------------------
  2036. Default: ``300``
  2037. Sets ZeroMQ TCP keepalive idle. May be used to tune issues with minion disconnects.
  2038. .. code-block:: yaml
  2039. tcp_keepalive_idle: 300
  2040. .. conf_minion:: tcp_keepalive_intvl
  2041. ``tcp_keepalive_intvl``
  2042. -----------------------
  2043. Default: ``-1``
  2044. Sets ZeroMQ TCP keepalive interval. May be used to tune issues with minion disconnects.
  2045. .. code-block:: yaml
  2046. tcp_keepalive_intvl': -1
  2047. Frozen Build Update Settings
  2048. ============================
  2049. These options control how :py:func:`salt.modules.saltutil.update` works with esky
  2050. frozen apps. For more information look at `<https://github.com/cloudmatrix/esky/>`_.
  2051. .. conf_minion:: update_url
  2052. ``update_url``
  2053. --------------
  2054. Default: ``False`` (Update feature is disabled)
  2055. The url to use when looking for application updates. Esky depends on directory
  2056. listings to search for new versions. A webserver running on your Master is a
  2057. good starting point for most setups.
  2058. .. code-block:: yaml
  2059. update_url: 'http://salt.example.com/minion-updates'
  2060. .. conf_minion:: update_restart_services
  2061. ``update_restart_services``
  2062. ---------------------------
  2063. Default: ``[]`` (service restarting on update is disabled)
  2064. A list of services to restart when the minion software is updated. This would
  2065. typically just be a list containing the minion's service name, but you may
  2066. have other services that need to go with it.
  2067. .. code-block:: yaml
  2068. update_restart_services: ['salt-minion']
  2069. .. conf_minion:: winrepo_cache_expire_min
  2070. ``winrepo_cache_expire_min``
  2071. ----------------------------
  2072. .. versionadded:: 2016.11.0
  2073. Default: ``1800``
  2074. If set to a nonzero integer, then passing ``refresh=True`` to functions in the
  2075. :mod:`windows pkg module <salt.modules.win_pkg>` will not refresh the windows
  2076. repo metadata if the age of the metadata is less than this value. The exception
  2077. to this is :py:func:`pkg.refresh_db <salt.modules.win_pkg.refresh_db>`, which
  2078. will always refresh the metadata, regardless of age.
  2079. .. code-block:: yaml
  2080. winrepo_cache_expire_min: 1800
  2081. .. conf_minion:: winrepo_cache_expire_max
  2082. ``winrepo_cache_expire_max``
  2083. ----------------------------
  2084. .. versionadded:: 2016.11.0
  2085. Default: ``21600``
  2086. If the windows repo metadata is older than this value, and the metadata is
  2087. needed by a function in the :mod:`windows pkg module <salt.modules.win_pkg>`,
  2088. the metadata will be refreshed.
  2089. .. code-block:: yaml
  2090. winrepo_cache_expire_max: 86400
  2091. .. _winrepo-minion-config-opts:
  2092. Minion Windows Software Repo Settings
  2093. =====================================
  2094. .. important::
  2095. To use these config options, the minion can be running in master-minion or
  2096. masterless mode.
  2097. .. conf_minion:: winrepo_source_dir
  2098. ``winrepo_source_dir``
  2099. ----------------------
  2100. Default: ``salt://win/repo-ng/``
  2101. The source location for the winrepo sls files.
  2102. .. code-block:: yaml
  2103. winrepo_source_dir: salt://win/repo-ng/
  2104. Standalone Minion Windows Software Repo Settings
  2105. ================================================
  2106. .. important::
  2107. To use these config options, the minion must be running in masterless mode
  2108. (set :conf_minion:`file_client` to ``local``).
  2109. .. conf_minion:: winrepo_dir
  2110. .. conf_minion:: win_repo
  2111. ``winrepo_dir``
  2112. ---------------
  2113. .. versionchanged:: 2015.8.0
  2114. Renamed from ``win_repo`` to ``winrepo_dir``. Also, this option did not
  2115. have a default value until this version.
  2116. Default: ``C:\salt\srv\salt\win\repo``
  2117. Location on the minion where the :conf_minion:`winrepo_remotes` are checked
  2118. out.
  2119. .. code-block:: yaml
  2120. winrepo_dir: 'D:\winrepo'
  2121. .. conf_minion:: winrepo_dir_ng
  2122. ``winrepo_dir_ng``
  2123. ------------------
  2124. .. versionadded:: 2015.8.0
  2125. A new :ref:`ng <windows-package-manager>` repo was added.
  2126. Default: ``/srv/salt/win/repo-ng``
  2127. Location on the minion where the :conf_minion:`winrepo_remotes_ng` are checked
  2128. out for 2015.8.0 and later minions.
  2129. .. code-block:: yaml
  2130. winrepo_dir_ng: /srv/salt/win/repo-ng
  2131. .. conf_minion:: winrepo_cachefile
  2132. .. conf_minion:: win_repo_cachefile
  2133. ``winrepo_cachefile``
  2134. ---------------------
  2135. .. versionchanged:: 2015.8.0
  2136. Renamed from ``win_repo_cachefile`` to ``winrepo_cachefile``. Also,
  2137. this option did not have a default value until this version.
  2138. Default: ``winrepo.p``
  2139. Path relative to :conf_minion:`winrepo_dir` where the winrepo cache should be
  2140. created.
  2141. .. code-block:: yaml
  2142. winrepo_cachefile: winrepo.p
  2143. .. conf_minion:: winrepo_remotes
  2144. .. conf_minion:: win_gitrepos
  2145. ``winrepo_remotes``
  2146. -------------------
  2147. .. versionchanged:: 2015.8.0
  2148. Renamed from ``win_gitrepos`` to ``winrepo_remotes``. Also, this option did
  2149. not have a default value until this version.
  2150. .. versionadded:: 2015.8.0
  2151. Default: ``['https://github.com/saltstack/salt-winrepo.git']``
  2152. List of git repositories to checkout and include in the winrepo
  2153. .. code-block:: yaml
  2154. winrepo_remotes:
  2155. - https://github.com/saltstack/salt-winrepo.git
  2156. To specify a specific revision of the repository, prepend a commit ID to the
  2157. URL of the repository:
  2158. .. code-block:: yaml
  2159. winrepo_remotes:
  2160. - '<commit_id> https://github.com/saltstack/salt-winrepo.git'
  2161. Replace ``<commit_id>`` with the SHA1 hash of a commit ID. Specifying a commit
  2162. ID is useful in that it allows one to revert back to a previous version in the
  2163. event that an error is introduced in the latest revision of the repo.
  2164. .. conf_minion:: winrepo_remotes_ng
  2165. ``winrepo_remotes_ng``
  2166. ----------------------
  2167. .. versionadded:: 2015.8.0
  2168. A new :ref:`ng <windows-package-manager>` repo was added.
  2169. Default: ``['https://github.com/saltstack/salt-winrepo-ng.git']``
  2170. List of git repositories to checkout and include in the winrepo for
  2171. 2015.8.0 and later minions.
  2172. .. code-block:: yaml
  2173. winrepo_remotes_ng:
  2174. - https://github.com/saltstack/salt-winrepo-ng.git
  2175. To specify a specific revision of the repository, prepend a commit ID to the
  2176. URL of the repository:
  2177. .. code-block:: yaml
  2178. winrepo_remotes_ng:
  2179. - '<commit_id> https://github.com/saltstack/salt-winrepo-ng.git'
  2180. Replace ``<commit_id>`` with the SHA1 hash of a commit ID. Specifying a commit
  2181. ID is useful in that it allows one to revert back to a previous version in the
  2182. event that an error is introduced in the latest revision of the repo.
  2183. ``ssh_merge_pillar``
  2184. --------------------
  2185. .. versionadded:: 2018.3.2
  2186. Default: ``True``
  2187. Merges the compiled pillar data with the pillar data already available globally.
  2188. This is useful when using ``salt-ssh`` or ``salt-call --local`` and overriding the pillar
  2189. data in a state file:
  2190. .. code-block:: yaml
  2191. apply_showpillar:
  2192. module.run:
  2193. - name: state.apply
  2194. - mods:
  2195. - showpillar
  2196. - kwargs:
  2197. pillar:
  2198. test: "foo bar"
  2199. If set to ``True`` the ``showpillar`` state will have access to the
  2200. global pillar data.
  2201. If set to ``False`` only the overriding pillar data will be available
  2202. to the ``showpillar`` state.