minion.rst 82 KB

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