minion.rst 83 KB

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