minion.rst 86 KB

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