minion.rst 86 KB

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