minion.rst 84 KB

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