1
0

master.rst 137 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702
  1. .. _configuration-salt-master:
  2. ===========================
  3. Configuring the Salt Master
  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. ``salt-master`` is configured via the master configuration file, and the
  8. ``salt-minion`` is configured via the minion configuration file.
  9. .. seealso::
  10. :ref:`Example master configuration file <configuration-examples-master>`.
  11. The configuration file for the salt-master is located at ``/etc/salt/master``
  12. by default. A notable exception is FreeBSD, where the configuration file is
  13. located at ``/usr/local/etc/salt``. The available options are as follows:
  14. .. _primary-master-configuration:
  15. Primary Master Configuration
  16. ============================
  17. .. conf_master:: interface
  18. ``interface``
  19. -------------
  20. Default: ``0.0.0.0`` (all interfaces)
  21. The local interface to bind to, must be an IP address.
  22. .. code-block:: yaml
  23. interface: 192.168.0.1
  24. .. conf_master:: ipv6
  25. ``ipv6``
  26. --------
  27. Default: ``False``
  28. Whether the master should listen for IPv6 connections. If this is set to True,
  29. the interface option must be adjusted too (for example: ``interface: '::'``)
  30. .. code-block:: yaml
  31. ipv6: True
  32. .. conf_master:: publish_port
  33. ``publish_port``
  34. ----------------
  35. Default: ``4505``
  36. The network port to set up the publication interface.
  37. .. code-block:: yaml
  38. publish_port: 4505
  39. .. conf_master:: master_id
  40. ``master_id``
  41. -------------
  42. Default: ``None``
  43. The id to be passed in the publish job to minions. This is used for MultiSyndics
  44. to return the job to the requesting master.
  45. .. note::
  46. This must be the same string as the syndic is configured with.
  47. .. code-block:: yaml
  48. master_id: MasterOfMaster
  49. .. conf_master:: user
  50. ``user``
  51. --------
  52. Default: ``root``
  53. The user to run the Salt processes
  54. .. code-block:: yaml
  55. user: root
  56. .. conf_master:: ret_port
  57. ``enable_ssh_minions``
  58. ----------------------
  59. Default: ``False``
  60. Tell the master to also use salt-ssh when running commands against minions.
  61. .. code-block:: yaml
  62. enable_ssh_minions: True
  63. .. note::
  64. Cross-minion communication is still not possible. The Salt mine and
  65. publish.publish do not work between minion types.
  66. ``ret_port``
  67. ------------
  68. Default: ``4506``
  69. The port used by the return server, this is the server used by Salt to receive
  70. execution returns and command executions.
  71. .. code-block:: yaml
  72. ret_port: 4506
  73. .. conf_master:: pidfile
  74. ``pidfile``
  75. -----------
  76. Default: ``/var/run/salt-master.pid``
  77. Specify the location of the master pidfile.
  78. .. code-block:: yaml
  79. pidfile: /var/run/salt-master.pid
  80. .. conf_master:: root_dir
  81. ``root_dir``
  82. ------------
  83. Default: ``/``
  84. The system root directory to operate from, change this to make Salt run from
  85. an alternative root.
  86. .. code-block:: yaml
  87. root_dir: /
  88. .. note::
  89. This directory is prepended to the following options:
  90. :conf_master:`pki_dir`, :conf_master:`cachedir`, :conf_master:`sock_dir`,
  91. :conf_master:`log_file`, :conf_master:`autosign_file`,
  92. :conf_master:`autoreject_file`, :conf_master:`pidfile`,
  93. :conf_master:`autosign_grains_dir`.
  94. .. conf_master:: conf_file
  95. ``conf_file``
  96. -------------
  97. Default: ``/etc/salt/master``
  98. The path to the master's configuration file.
  99. .. code-block:: yaml
  100. conf_file: /etc/salt/master
  101. .. conf_master:: pki_dir
  102. ``pki_dir``
  103. -----------
  104. Default: ``/etc/salt/pki/master``
  105. The directory to store the pki authentication keys.
  106. .. code-block:: yaml
  107. pki_dir: /etc/salt/pki/master
  108. .. conf_master:: extension_modules
  109. ``extension_modules``
  110. ---------------------
  111. .. versionchanged:: 2016.3.0
  112. The default location for this directory has been moved. Prior to this
  113. version, the location was a directory named ``extmods`` in the Salt
  114. cachedir (on most platforms, ``/var/cache/salt/extmods``). It has been
  115. moved into the master cachedir (on most platforms,
  116. ``/var/cache/salt/master/extmods``).
  117. Directory for custom modules. This directory can contain subdirectories for
  118. each of Salt's module types such as ``runners``, ``output``, ``wheel``,
  119. ``modules``, ``states``, ``returners``, ``engines``, ``utils``, etc.
  120. This path is appended to :conf_master:`root_dir`.
  121. .. code-block:: yaml
  122. extension_modules: /root/salt_extmods
  123. .. conf_master:: extmod_whitelist
  124. .. conf_master:: extmod_blacklist
  125. ``extmod_whitelist/extmod_blacklist``
  126. -------------------------------------
  127. .. versionadded:: 2017.7.0
  128. By using this dictionary, the modules that are synced to the master's extmod cache using `saltutil.sync_*` can be
  129. limited. If nothing is set to a specific type, then all modules are accepted. To block all modules of a specific type,
  130. whitelist an empty list.
  131. .. code-block:: yaml
  132. extmod_whitelist:
  133. modules:
  134. - custom_module
  135. engines:
  136. - custom_engine
  137. pillars: []
  138. extmod_blacklist:
  139. modules:
  140. - specific_module
  141. Valid options:
  142. - modules
  143. - states
  144. - grains
  145. - renderers
  146. - returners
  147. - output
  148. - proxy
  149. - runners
  150. - wheel
  151. - engines
  152. - queues
  153. - pillar
  154. - utils
  155. - sdb
  156. - cache
  157. - clouds
  158. - tops
  159. - roster
  160. - tokens
  161. .. conf_master:: module_dirs
  162. ``module_dirs``
  163. ---------------
  164. Default: ``[]``
  165. Like ``extension_modules``, but a list of extra directories to search
  166. for Salt modules.
  167. .. code-block:: yaml
  168. module_dirs:
  169. - /var/cache/salt/minion/extmods
  170. .. conf_master:: cachedir
  171. ``cachedir``
  172. ------------
  173. Default: ``/var/cache/salt/master``
  174. The location used to store cache information, particularly the job information
  175. for executed salt commands.
  176. This directory may contain sensitive data and should be protected accordingly.
  177. .. code-block:: yaml
  178. cachedir: /var/cache/salt/master
  179. .. conf_master:: verify_env
  180. ``verify_env``
  181. --------------
  182. Default: ``True``
  183. Verify and set permissions on configuration directories at startup.
  184. .. code-block:: yaml
  185. verify_env: True
  186. .. conf_master:: keep_jobs
  187. ``keep_jobs``
  188. -------------
  189. Default: ``24``
  190. Set the number of hours to keep old job information. Note that setting this option
  191. to ``0`` disables the cache cleaner.
  192. .. code-block:: yaml
  193. keep_jobs: 24
  194. .. conf_master:: gather_job_timeout
  195. ``gather_job_timeout``
  196. ----------------------
  197. .. versionadded:: 2014.7.0
  198. Default: ``10``
  199. The number of seconds to wait when the client is requesting information
  200. about running jobs.
  201. .. code-block:: yaml
  202. gather_job_timeout: 10
  203. .. conf_master:: timeout
  204. ``timeout``
  205. -----------
  206. Default: ``5``
  207. Set the default timeout for the salt command and api.
  208. .. conf_master:: loop_interval
  209. ``loop_interval``
  210. -----------------
  211. Default: ``60``
  212. The loop_interval option controls the seconds for the master's maintenance
  213. process check cycle. This process updates file server backends, cleans the
  214. job cache and executes the scheduler.
  215. .. conf_master:: output
  216. ``output``
  217. ----------
  218. Default: ``nested``
  219. Set the default outputter used by the salt command.
  220. .. conf_master:: outputter_dirs
  221. ``outputter_dirs``
  222. ------------------
  223. Default: ``[]``
  224. A list of additional directories to search for salt outputters in.
  225. .. code-block:: yaml
  226. outputter_dirs: []
  227. .. conf_master:: output_file
  228. ``output_file``
  229. ---------------
  230. Default: None
  231. Set the default output file used by the salt command. Default is to output
  232. to the CLI and not to a file. Functions the same way as the "--out-file"
  233. CLI option, only sets this to a single file for all salt commands.
  234. .. code-block:: yaml
  235. output_file: /path/output/file
  236. .. conf_master:: show_timeout
  237. ``show_timeout``
  238. ----------------
  239. Default: ``True``
  240. Tell the client to show minions that have timed out.
  241. .. code-block:: yaml
  242. show_timeout: True
  243. .. conf_master:: show_jid
  244. ``show_jid``
  245. ------------
  246. Default: ``False``
  247. Tell the client to display the jid when a job is published.
  248. .. code-block:: yaml
  249. show_jid: False
  250. .. conf_master:: color
  251. ``color``
  252. ---------
  253. Default: ``True``
  254. By default output is colored, to disable colored output set the color value
  255. to False.
  256. .. code-block:: yaml
  257. color: False
  258. .. conf_master:: color_theme
  259. ``color_theme``
  260. ---------------
  261. Default: ``""``
  262. Specifies a path to the color theme to use for colored command line output.
  263. .. code-block:: yaml
  264. color_theme: /etc/salt/color_theme
  265. .. conf_master:: cli_summary
  266. ``cli_summary``
  267. ---------------
  268. Default: ``False``
  269. When set to ``True``, displays a summary of the number of minions targeted,
  270. the number of minions returned, and the number of minions that did not
  271. return.
  272. .. code-block:: yaml
  273. cli_summary: False
  274. .. conf_master:: sock_dir
  275. ``sock_dir``
  276. ------------
  277. Default: :file:`/var/run/salt/master`
  278. Set the location to use for creating Unix sockets for master process
  279. communication.
  280. .. code-block:: yaml
  281. sock_dir: /var/run/salt/master
  282. .. conf_master:: enable_gpu_grains
  283. ``enable_gpu_grains``
  284. ---------------------
  285. Default: ``False``
  286. Enable GPU hardware data for your master. Be aware that the master can
  287. take a while to start up when lspci and/or dmidecode is used to populate the
  288. grains for the master.
  289. .. code-block:: yaml
  290. enable_gpu_grains: True
  291. .. conf_master:: job_cache
  292. ``job_cache``
  293. -------------
  294. Default: ``True``
  295. The master maintains a temporary job cache. While this is a great addition, it
  296. can be a burden on the master for larger deployments (over 5000 minions).
  297. Disabling the job cache will make previously executed jobs unavailable to
  298. the jobs system and is not generally recommended. Normally it is wise to make
  299. sure the master has access to a faster IO system or a tmpfs is mounted to the
  300. jobs dir.
  301. .. code-block:: yaml
  302. job_cache: True
  303. .. note::
  304. Setting the ``job_cache`` to ``False`` will not cache minion returns, but
  305. the JID directory for each job is still created. The creation of the JID
  306. directories is necessary because Salt uses those directories to check for
  307. JID collisions. By setting this option to ``False``, the job cache
  308. directory, which is ``/var/cache/salt/master/jobs/`` by default, will be
  309. smaller, but the JID directories will still be present.
  310. Note that the :conf_master:`keep_jobs` option can be set to a lower value,
  311. such as ``1``, to limit the number of hours jobs are stored in the job
  312. cache. (The default is 24 hours.)
  313. Please see the :ref:`Managing the Job Cache <managing_the_job_cache>`
  314. documentation for more information.
  315. .. conf_master:: minion_data_cache
  316. ``minion_data_cache``
  317. ---------------------
  318. Default: ``True``
  319. The minion data cache is a cache of information about the minions stored on the
  320. master, this information is primarily the pillar, grains and mine data. The data
  321. is cached via the cache subsystem in the Master cachedir under the name of the
  322. minion or in a supported database. The data is used to predetermine what minions
  323. are expected to reply from executions.
  324. .. code-block:: yaml
  325. minion_data_cache: True
  326. .. conf_master:: cache
  327. ``cache``
  328. ---------
  329. Default: ``localfs``
  330. Cache subsystem module to use for minion data cache.
  331. .. code-block:: yaml
  332. cache: consul
  333. .. conf_master:: memcache_expire_seconds
  334. ``memcache_expire_seconds``
  335. ---------------------------
  336. Default: ``0``
  337. Memcache is an additional cache layer that keeps a limited amount of data
  338. fetched from the minion data cache for a limited period of time in memory that
  339. makes cache operations faster. It doesn't make much sense for the ``localfs``
  340. cache driver but helps for more complex drivers like ``consul``.
  341. This option sets the memcache items expiration time. By default is set to ``0``
  342. that disables the memcache.
  343. .. code-block:: yaml
  344. memcache_expire_seconds: 30
  345. .. conf_master:: memcache_max_items
  346. ``memcache_max_items``
  347. ----------------------
  348. Default: ``1024``
  349. Set memcache limit in items that are bank-key pairs. I.e the list of
  350. minion_0/data, minion_0/mine, minion_1/data contains 3 items. This value depends
  351. on the count of minions usually targeted in your environment. The best one could
  352. be found by analyzing the cache log with ``memcache_debug`` enabled.
  353. .. code-block:: yaml
  354. memcache_max_items: 1024
  355. .. conf_master:: memcache_full_cleanup
  356. ``memcache_full_cleanup``
  357. -------------------------
  358. Default: ``False``
  359. If cache storage got full, i.e. the items count exceeds the
  360. ``memcache_max_items`` value, memcache cleans up it's storage. If this option
  361. set to ``False`` memcache removes the only one oldest value from it's storage.
  362. If this set set to ``True`` memcache removes all the expired items and also
  363. removes the oldest one if there are no expired items.
  364. .. code-block:: yaml
  365. memcache_full_cleanup: True
  366. .. conf_master:: memcache_debug
  367. ``memcache_debug``
  368. ------------------
  369. Default: ``False``
  370. Enable collecting the memcache stats and log it on `debug` log level. If enabled
  371. memcache collect information about how many ``fetch`` calls has been done and
  372. how many of them has been hit by memcache. Also it outputs the rate value that
  373. is the result of division of the first two values. This should help to choose
  374. right values for the expiration time and the cache size.
  375. .. code-block:: yaml
  376. memcache_debug: True
  377. .. conf_master:: ext_job_cache
  378. ``ext_job_cache``
  379. -----------------
  380. Default: ``''``
  381. Used to specify a default returner for all minions. When this option is set,
  382. the specified returner needs to be properly configured and the minions will
  383. always default to sending returns to this returner. This will also disable the
  384. local job cache on the master.
  385. .. code-block:: yaml
  386. ext_job_cache: redis
  387. .. conf_master:: event_return
  388. ``event_return``
  389. ----------------
  390. .. versionadded:: 2015.5.0
  391. Default: ``''``
  392. Specify the returner(s) to use to log events. Each returner may have
  393. installation and configuration requirements. Read the returner's
  394. documentation.
  395. .. note::
  396. Not all returners support event returns. Verify that a returner has an
  397. ``event_return()`` function before configuring this option with a returner.
  398. .. code-block:: yaml
  399. event_return:
  400. - syslog
  401. - splunk
  402. .. conf_master:: event_return_queue
  403. ``event_return_queue``
  404. ----------------------
  405. .. versionadded:: 2015.5.0
  406. Default: ``0``
  407. On busy systems, enabling event_returns can cause a considerable load on
  408. the storage system for returners. Events can be queued on the master and
  409. stored in a batched fashion using a single transaction for multiple events.
  410. By default, events are not queued.
  411. .. code-block:: yaml
  412. event_return_queue: 0
  413. .. conf_master:: event_return_whitelist
  414. ``event_return_whitelist``
  415. --------------------------
  416. .. versionadded:: 2015.5.0
  417. Default: ``[]``
  418. Only return events matching tags in a whitelist.
  419. .. versionchanged:: 2016.11.0
  420. Supports glob matching patterns.
  421. .. code-block:: yaml
  422. event_return_whitelist:
  423. - salt/master/a_tag
  424. - salt/run/*/ret
  425. .. conf_master:: event_return_blacklist
  426. ``event_return_blacklist``
  427. --------------------------
  428. .. versionadded:: 2015.5.0
  429. Default: ``[]``
  430. Store all event returns _except_ the tags in a blacklist.
  431. .. versionchanged:: 2016.11.0
  432. Supports glob matching patterns.
  433. .. code-block:: yaml
  434. event_return_blacklist:
  435. - salt/master/not_this_tag
  436. - salt/wheel/*/ret
  437. .. conf_master:: max_event_size
  438. ``max_event_size``
  439. ------------------
  440. .. versionadded:: 2014.7.0
  441. Default: ``1048576``
  442. Passing very large events can cause the minion to consume large amounts of
  443. memory. This value tunes the maximum size of a message allowed onto the
  444. master event bus. The value is expressed in bytes.
  445. .. code-block:: yaml
  446. max_event_size: 1048576
  447. .. conf_master:: master_job_cache
  448. ``master_job_cache``
  449. --------------------
  450. .. versionadded:: 2014.7.0
  451. Default: ``local_cache``
  452. Specify the returner to use for the job cache. The job cache will only be
  453. interacted with from the salt master and therefore does not need to be
  454. accessible from the minions.
  455. .. code-block:: yaml
  456. master_job_cache: redis
  457. .. conf_master:: job_cache_store_endtime
  458. ``job_cache_store_endtime``
  459. ---------------------------
  460. .. versionadded:: 2015.8.0
  461. Default: ``False``
  462. Specify whether the Salt Master should store end times for jobs as returns
  463. come in.
  464. .. code-block:: yaml
  465. job_cache_store_endtime: False
  466. .. conf_master:: enforce_mine_cache
  467. ``enforce_mine_cache``
  468. ----------------------
  469. Default: False
  470. By-default when disabling the minion_data_cache mine will stop working since
  471. it is based on cached data, by enabling this option we explicitly enabling
  472. only the cache for the mine system.
  473. .. code-block:: yaml
  474. enforce_mine_cache: False
  475. .. conf_master:: max_minions
  476. ``max_minions``
  477. ---------------
  478. Default: 0
  479. The maximum number of minion connections allowed by the master. Use this to
  480. accommodate the number of minions per master if you have different types of
  481. hardware serving your minions. The default of ``0`` means unlimited connections.
  482. Please note that this can slow down the authentication process a bit in large
  483. setups.
  484. .. code-block:: yaml
  485. max_minions: 100
  486. ``con_cache``
  487. -------------
  488. Default: False
  489. If max_minions is used in large installations, the master might experience
  490. high-load situations because of having to check the number of connected
  491. minions for every authentication. This cache provides the minion-ids of
  492. all connected minions to all MWorker-processes and greatly improves the
  493. performance of max_minions.
  494. .. code-block:: yaml
  495. con_cache: True
  496. .. conf_master:: presence_events
  497. ``presence_events``
  498. -------------------
  499. Default: False
  500. Causes the master to periodically look for actively connected minions.
  501. :ref:`Presence events <event-master_presence>` are fired on the event bus on a
  502. regular interval with a list of connected minions, as well as events with lists
  503. of newly connected or disconnected minions. This is a master-only operation
  504. that does not send executions to minions.
  505. .. code-block:: yaml
  506. presence_events: False
  507. .. conf_master:: ping_on_rotate
  508. ``ping_on_rotate``
  509. ------------------
  510. .. versionadded:: 2014.7.0
  511. Default: ``False``
  512. By default, the master AES key rotates every 24 hours. The next command
  513. following a key rotation will trigger a key refresh from the minion which may
  514. result in minions which do not respond to the first command after a key refresh.
  515. To tell the master to ping all minions immediately after an AES key refresh,
  516. set ``ping_on_rotate`` to ``True``. This should mitigate the issue where a
  517. minion does not appear to initially respond after a key is rotated.
  518. Note that enabling this may cause high load on the master immediately after the
  519. key rotation event as minions reconnect. Consider this carefully if this salt
  520. master is managing a large number of minions.
  521. If disabled, it is recommended to handle this event by listening for the
  522. ``aes_key_rotate`` event with the ``key`` tag and acting appropriately.
  523. .. code-block:: yaml
  524. ping_on_rotate: False
  525. .. conf_master:: transport
  526. ``transport``
  527. -------------
  528. Default: ``zeromq``
  529. Changes the underlying transport layer. ZeroMQ is the recommended transport
  530. while additional transport layers are under development. Supported values are
  531. ``zeromq`` and ``tcp`` (experimental). This setting has a significant impact on
  532. performance and should not be changed unless you know what you are doing!
  533. .. code-block:: yaml
  534. transport: zeromq
  535. .. conf_master:: transport_opts
  536. ``transport_opts``
  537. ------------------
  538. Default: ``{}``
  539. (experimental) Starts multiple transports and overrides options for each
  540. transport with the provided dictionary This setting has a significant impact on
  541. performance and should not be changed unless you know what you are doing! The
  542. following example shows how to start a TCP transport alongside a ZMQ transport.
  543. .. code-block:: yaml
  544. transport_opts:
  545. tcp:
  546. publish_port: 4605
  547. ret_port: 4606
  548. zeromq: []
  549. .. conf_master:: master_stats
  550. ``master_stats``
  551. ----------------
  552. Default: False
  553. Turning on the master stats enables runtime throughput and statistics events
  554. to be fired from the master event bus. These events will report on what
  555. functions have been run on the master and how long these runs have, on
  556. average, taken over a given period of time.
  557. .. conf_master:: master_stats_event_iter
  558. ``master_stats_event_iter``
  559. ---------------------------
  560. Default: 60
  561. The time in seconds to fire master_stats events. This will only fire in
  562. conjunction with receiving a request to the master, idle masters will not
  563. fire these events.
  564. .. conf_master:: sock_pool_size
  565. ``sock_pool_size``
  566. ------------------
  567. Default: 1
  568. To avoid blocking waiting while writing a data to a socket, we support
  569. socket pool for Salt applications. For example, a job with a large number
  570. of target host list can cause long period blocking waiting. The option
  571. is used by ZMQ and TCP transports, and the other transport methods don't
  572. need the socket pool by definition. Most of Salt tools, including CLI,
  573. are enough to use a single bucket of socket pool. On the other hands,
  574. it is highly recommended to set the size of socket pool larger than 1
  575. for other Salt applications, especially Salt API, which must write data
  576. to socket concurrently.
  577. .. code-block:: yaml
  578. sock_pool_size: 15
  579. .. conf_master:: ipc_mode
  580. ``ipc_mode``
  581. ------------
  582. Default: ``ipc``
  583. The ipc strategy. (i.e., sockets versus tcp, etc.) Windows platforms lack
  584. POSIX IPC and must rely on TCP based inter-process communications. ``ipc_mode``
  585. is set to ``tcp`` by default on Windows.
  586. .. code-block:: yaml
  587. ipc_mode: ipc
  588. .. conf_master:: tcp_master_pub_port
  589. ``tcp_master_pub_port``
  590. -----------------------
  591. Default: ``4512``
  592. The TCP port on which events for the master should be published if ``ipc_mode`` is TCP.
  593. .. code-block:: yaml
  594. tcp_master_pub_port: 4512
  595. .. conf_master:: tcp_master_pull_port
  596. ``tcp_master_pull_port``
  597. ------------------------
  598. Default: ``4513``
  599. The TCP port on which events for the master should be pulled if ``ipc_mode`` is TCP.
  600. .. code-block:: yaml
  601. tcp_master_pull_port: 4513
  602. .. conf_master:: tcp_master_publish_pull
  603. ``tcp_master_publish_pull``
  604. ---------------------------
  605. Default: ``4514``
  606. The TCP port on which events for the master should be pulled fom and then republished onto
  607. the event bus on the master.
  608. .. code-block:: yaml
  609. tcp_master_publish_pull: 4514
  610. .. conf_master:: tcp_master_workers
  611. ``tcp_master_workers``
  612. ----------------------
  613. Default: ``4515``
  614. The TCP port for ``mworkers`` to connect to on the master.
  615. .. code-block:: yaml
  616. tcp_master_workers: 4515
  617. .. conf_master:: auth_events
  618. ``auth_events``
  619. --------------------
  620. .. versionadded:: 2017.7.3
  621. Default: ``True``
  622. Determines whether the master will fire authentication events.
  623. :ref:`Authentication events <event-master_auth>` are fired when
  624. a minion performs an authentication check with the master.
  625. .. code-block:: yaml
  626. auth_events: True
  627. .. conf_master:: minion_data_cache_events
  628. ``minion_data_cache_events``
  629. ----------------------------
  630. .. versionadded:: 2017.7.3
  631. Default: ``True``
  632. Determines whether the master will fire minion data cache events. Minion data
  633. cache events are fired when a minion requests a minion data cache refresh.
  634. .. code-block:: yaml
  635. minion_data_cache_events: True
  636. .. conf_master:: http_connect_timeout
  637. ``http_connect_timeout``
  638. ------------------------
  639. .. versionadded:: 2019.2.0
  640. Default: ``20``
  641. HTTP connection timeout in seconds.
  642. Applied when fetching files using tornado back-end.
  643. Should be greater than overall download time.
  644. .. code-block:: yaml
  645. http_connect_timeout: 20
  646. .. conf_master:: http_request_timeout
  647. ``http_request_timeout``
  648. ------------------------
  649. .. versionadded:: 2015.8.0
  650. Default: ``3600``
  651. HTTP request timeout in seconds.
  652. Applied when fetching files using tornado back-end.
  653. Should be greater than overall download time.
  654. .. code-block:: yaml
  655. http_request_timeout: 3600
  656. .. _salt-ssh-configuration:
  657. Salt-SSH Configuration
  658. ======================
  659. .. conf_master:: roster
  660. ``roster``
  661. ---------------
  662. Default: ``flat``
  663. Define the default salt-ssh roster module to use
  664. .. code-block:: yaml
  665. roster: cache
  666. .. conf_master:: roster_defaults
  667. ``roster_defaults``
  668. -------------------
  669. .. versionadded:: 2017.7.0
  670. Default settings which will be inherited by all rosters.
  671. .. code-block:: yaml
  672. roster_defaults:
  673. user: daniel
  674. sudo: True
  675. priv: /root/.ssh/id_rsa
  676. tty: True
  677. .. conf_master:: roster_file
  678. ``roster_file``
  679. ---------------
  680. Default: ``/etc/salt/roster``
  681. Pass in an alternative location for the salt-ssh :py:mod:`flat
  682. <salt.roster.flat>` roster file.
  683. .. code-block:: yaml
  684. roster_file: /root/roster
  685. .. conf_master:: rosters
  686. ``rosters``
  687. -----------
  688. Default: ``None``
  689. Define locations for :py:mod:`flat <salt.roster.flat>` roster files so they can
  690. be chosen when using Salt API. An administrator can place roster files into
  691. these locations. Then, when calling Salt API, the :conf_master:`roster_file`
  692. parameter should contain a relative path to these locations. That is,
  693. ``roster_file=/foo/roster`` will be resolved as
  694. ``/etc/salt/roster.d/foo/roster`` etc. This feature prevents passing insecure
  695. custom rosters through the Salt API.
  696. .. code-block:: yaml
  697. rosters:
  698. - /etc/salt/roster.d
  699. - /opt/salt/some/more/rosters
  700. .. conf_master:: ssh_passwd
  701. ``ssh_passwd``
  702. --------------
  703. Default: ``''``
  704. The ssh password to log in with.
  705. .. code-block:: yaml
  706. ssh_passwd: ''
  707. .. conf_master:: ssh_priv_passwd
  708. ``ssh_priv_passwd``
  709. -------------------
  710. Default: ``''``
  711. Passphrase for ssh private key file.
  712. .. code-block:: yaml
  713. ssh_priv_passwd: ''
  714. .. conf_master:: ssh_port
  715. ``ssh_port``
  716. ------------
  717. Default: ``22``
  718. The target system's ssh port number.
  719. .. code-block:: yaml
  720. ssh_port: 22
  721. .. conf_master:: ssh_scan_ports
  722. ``ssh_scan_ports``
  723. ------------------
  724. Default: ``22``
  725. Comma-separated list of ports to scan.
  726. .. code-block:: yaml
  727. ssh_scan_ports: 22
  728. .. conf_master:: ssh_scan_timeout
  729. ``ssh_scan_timeout``
  730. --------------------
  731. Default: ``0.01``
  732. Scanning socket timeout for salt-ssh.
  733. .. code-block:: yaml
  734. ssh_scan_timeout: 0.01
  735. .. conf_master:: ssh_sudo
  736. ``ssh_sudo``
  737. ------------
  738. Default: ``False``
  739. Boolean to run command via sudo.
  740. .. code-block:: yaml
  741. ssh_sudo: False
  742. .. conf_master:: ssh_timeout
  743. ``ssh_timeout``
  744. ---------------
  745. Default: ``60``
  746. Number of seconds to wait for a response when establishing an SSH connection.
  747. .. code-block:: yaml
  748. ssh_timeout: 60
  749. .. conf_master:: ssh_user
  750. ``ssh_user``
  751. ------------
  752. Default: ``root``
  753. The user to log in as.
  754. .. code-block:: yaml
  755. ssh_user: root
  756. .. conf_master:: ssh_log_file
  757. ``ssh_log_file``
  758. ----------------
  759. .. versionadded:: 2016.3.5
  760. Default: ``/var/log/salt/ssh``
  761. Specify the log file of the ``salt-ssh`` command.
  762. .. code-block:: yaml
  763. ssh_log_file: /var/log/salt/ssh
  764. .. conf_master:: ssh_minion_opts
  765. ``ssh_minion_opts``
  766. -------------------
  767. Default: None
  768. Pass in minion option overrides that will be inserted into the SHIM for
  769. salt-ssh calls. The local minion config is not used for salt-ssh. Can be
  770. overridden on a per-minion basis in the roster (``minion_opts``)
  771. .. code-block:: yaml
  772. ssh_minion_opts:
  773. gpg_keydir: /root/gpg
  774. .. conf_master:: ssh_use_home_key
  775. ``ssh_use_home_key``
  776. --------------------
  777. Default: False
  778. Set this to True to default to using ``~/.ssh/id_rsa`` for salt-ssh
  779. authentication with minions
  780. .. code-block:: yaml
  781. ssh_use_home_key: False
  782. .. conf_master:: ssh_identities_only
  783. ``ssh_identities_only``
  784. -----------------------
  785. Default: ``False``
  786. Set this to ``True`` to default salt-ssh to run with ``-o IdentitiesOnly=yes``. This
  787. option is intended for situations where the ssh-agent offers many different identities
  788. and allows ssh to ignore those identities and use the only one specified in options.
  789. .. code-block:: yaml
  790. ssh_identities_only: False
  791. .. conf_master:: ssh_list_nodegroups
  792. ``ssh_list_nodegroups``
  793. -----------------------
  794. Default: ``{}``
  795. List-only nodegroups for salt-ssh. Each group must be formed as either a comma-separated
  796. list, or a YAML list. This option is useful to group minions into easy-to-target groups
  797. when using salt-ssh. These groups can then be targeted with the normal -N argument to
  798. salt-ssh.
  799. .. code-block:: yaml
  800. ssh_list_nodegroups:
  801. groupA: minion1,minion2
  802. groupB: minion1,minion3
  803. .. conf_master:: thin_extra_mods
  804. ``thin_extra_mods``
  805. -------------------
  806. Default: None
  807. List of additional modules, needed to be included into the Salt Thin.
  808. Pass a list of importable Python modules that are typically located in
  809. the `site-packages` Python directory so they will be also always included
  810. into the Salt Thin, once generated.
  811. ``min_extra_mods``
  812. ------------------
  813. Default: None
  814. Identical as `thin_extra_mods`, only applied to the Salt Minimal.
  815. .. _master-security-settings:
  816. Master Security Settings
  817. ========================
  818. .. conf_master:: open_mode
  819. ``open_mode``
  820. -------------
  821. Default: ``False``
  822. Open mode is a dangerous security feature. One problem encountered with pki
  823. authentication systems is that keys can become "mixed up" and authentication
  824. begins to fail. Open mode turns off authentication and tells the master to
  825. accept all authentication. This will clean up the pki keys received from the
  826. minions. Open mode should not be turned on for general use. Open mode should
  827. only be used for a short period of time to clean up pki keys. To turn on open
  828. mode set this value to ``True``.
  829. .. code-block:: yaml
  830. open_mode: False
  831. .. conf_master:: auto_accept
  832. ``auto_accept``
  833. ---------------
  834. Default: ``False``
  835. Enable auto_accept. This setting will automatically accept all incoming
  836. public keys from minions.
  837. .. code-block:: yaml
  838. auto_accept: False
  839. .. conf_master:: keysize
  840. ``keysize``
  841. -----------
  842. Default: ``2048``
  843. The size of key that should be generated when creating new keys.
  844. .. code-block:: yaml
  845. keysize: 2048
  846. .. conf_master:: autosign_timeout
  847. ``autosign_timeout``
  848. --------------------
  849. .. versionadded:: 2014.7.0
  850. Default: ``120``
  851. Time in minutes that a incoming public key with a matching name found in
  852. pki_dir/minion_autosign/keyid is automatically accepted. Expired autosign keys
  853. are removed when the master checks the minion_autosign directory. This method
  854. to auto accept minions can be safer than an autosign_file because the
  855. keyid record can expire and is limited to being an exact name match.
  856. This should still be considered a less than secure option, due to the fact
  857. that trust is based on just the requesting minion id.
  858. .. conf_master:: autosign_file
  859. ``autosign_file``
  860. -----------------
  861. Default: ``not defined``
  862. If the ``autosign_file`` is specified incoming keys specified in the autosign_file
  863. will be automatically accepted. Matches will be searched for first by string
  864. comparison, then by globbing, then by full-string regex matching.
  865. This should still be considered a less than secure option, due to the fact
  866. that trust is based on just the requesting minion id.
  867. .. versionchanged:: 2018.3.0
  868. For security reasons the file must be readonly except for it's owner.
  869. If :conf_master:`permissive_pki_access` is ``True`` the owning group can also
  870. have write access, but if Salt is running as ``root`` it must be a member of that group.
  871. A less strict requirement also existed in previous version.
  872. .. conf_master:: autoreject_file
  873. ``autoreject_file``
  874. -------------------
  875. .. versionadded:: 2014.1.0
  876. Default: ``not defined``
  877. Works like :conf_master:`autosign_file`, but instead allows you to specify
  878. minion IDs for which keys will automatically be rejected. Will override both
  879. membership in the :conf_master:`autosign_file` and the
  880. :conf_master:`auto_accept` setting.
  881. .. conf_master:: autosign_grains_dir
  882. ``autosign_grains_dir``
  883. -----------------------
  884. .. versionadded:: 2018.3.0
  885. Default: ``not defined``
  886. If the ``autosign_grains_dir`` is specified, incoming keys from minions with
  887. grain values that match those defined in files in the autosign_grains_dir
  888. will be accepted automatically. Grain values that should be accepted automatically
  889. can be defined by creating a file named like the corresponding grain in the
  890. autosign_grains_dir and writing the values into that file, one value per line.
  891. Lines starting with a ``#`` will be ignored.
  892. Minion must be configured to send the corresponding grains on authentication.
  893. This should still be considered a less than secure option, due to the fact
  894. that trust is based on just the requesting minion.
  895. Please see the :ref:`Autoaccept Minions from Grains <tutorial-autoaccept-grains>`
  896. documentation for more information.
  897. .. code-block:: yaml
  898. autosign_grains_dir: /etc/salt/autosign_grains
  899. .. conf_master:: permissive_pki_access
  900. ``permissive_pki_access``
  901. -------------------------
  902. Default: ``False``
  903. Enable permissive access to the salt keys. This allows you to run the
  904. master or minion as root, but have a non-root group be given access to
  905. your pki_dir. To make the access explicit, root must belong to the group
  906. you've given access to. This is potentially quite insecure. If an autosign_file
  907. is specified, enabling permissive_pki_access will allow group access to that
  908. specific file.
  909. .. code-block:: yaml
  910. permissive_pki_access: False
  911. .. conf_master:: publisher_acl
  912. ``publisher_acl``
  913. -----------------
  914. Default: ``{}``
  915. Enable user accounts on the master to execute specific modules. These modules
  916. can be expressed as regular expressions.
  917. .. code-block:: yaml
  918. publisher_acl:
  919. fred:
  920. - test.ping
  921. - pkg.*
  922. .. conf_master:: publisher_acl_blacklist
  923. ``publisher_acl_blacklist``
  924. ---------------------------
  925. Default: ``{}``
  926. Blacklist users or modules
  927. This example would blacklist all non sudo users, including root from
  928. running any commands. It would also blacklist any use of the "cmd"
  929. module.
  930. This is completely disabled by default.
  931. .. code-block:: yaml
  932. publisher_acl_blacklist:
  933. users:
  934. - root
  935. - '^(?!sudo_).*$' # all non sudo users
  936. modules:
  937. - cmd.*
  938. - test.echo
  939. .. conf_master:: sudo_acl
  940. ``sudo_acl``
  941. ------------
  942. Default: ``False``
  943. Enforce ``publisher_acl`` and ``publisher_acl_blacklist`` when users have sudo
  944. access to the salt command.
  945. .. code-block:: yaml
  946. sudo_acl: False
  947. .. conf_master:: external_auth
  948. ``external_auth``
  949. -----------------
  950. Default: ``{}``
  951. The external auth system uses the Salt auth modules to authenticate and
  952. validate users to access areas of the Salt system.
  953. .. code-block:: yaml
  954. external_auth:
  955. pam:
  956. fred:
  957. - test.*
  958. .. conf_master:: token_expire
  959. ``token_expire``
  960. ----------------
  961. Default: ``43200``
  962. Time (in seconds) for a newly generated token to live.
  963. Default: 12 hours
  964. .. code-block:: yaml
  965. token_expire: 43200
  966. .. conf_master:: token_expire_user_override
  967. ``token_expire_user_override``
  968. ------------------------------
  969. Default: ``False``
  970. Allow eauth users to specify the expiry time of the tokens they generate.
  971. A boolean applies to all users or a dictionary of whitelisted eauth backends
  972. and usernames may be given:
  973. .. code-block:: yaml
  974. token_expire_user_override:
  975. pam:
  976. - fred
  977. - tom
  978. ldap:
  979. - gary
  980. .. conf_master:: keep_acl_in_token
  981. ``keep_acl_in_token``
  982. ---------------------
  983. Default: ``False``
  984. Set to True to enable keeping the calculated user's auth list in the token
  985. file. This is disabled by default and the auth list is calculated or requested
  986. from the eauth driver each time.
  987. .. code-block:: yaml
  988. keep_acl_in_token: False
  989. .. conf_master:: eauth_acl_module
  990. ``eauth_acl_module``
  991. --------------------
  992. Default: ``''``
  993. Auth subsystem module to use to get authorized access list for a user. By default it's
  994. the same module used for external authentication.
  995. .. code-block:: yaml
  996. eauth_acl_module: django
  997. .. conf_master:: file_recv
  998. ``file_recv``
  999. -------------
  1000. Default: ``False``
  1001. Allow minions to push files to the master. This is disabled by default, for
  1002. security purposes.
  1003. .. code-block:: yaml
  1004. file_recv: False
  1005. .. conf_master:: file_recv_max_size
  1006. ``file_recv_max_size``
  1007. ----------------------
  1008. .. versionadded:: 2014.7.0
  1009. Default: ``100``
  1010. Set a hard-limit on the size of the files that can be pushed to the master.
  1011. It will be interpreted as megabytes.
  1012. .. code-block:: yaml
  1013. file_recv_max_size: 100
  1014. .. conf_master:: master_sign_pubkey
  1015. ``master_sign_pubkey``
  1016. ----------------------
  1017. Default: ``False``
  1018. Sign the master auth-replies with a cryptographic signature of the master's
  1019. public key. Please see the tutorial how to use these settings in the
  1020. `Multimaster-PKI with Failover Tutorial <http://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html>`_
  1021. .. code-block:: yaml
  1022. master_sign_pubkey: True
  1023. .. conf_master:: master_sign_key_name
  1024. ``master_sign_key_name``
  1025. ------------------------
  1026. Default: ``master_sign``
  1027. The customizable name of the signing-key-pair without suffix.
  1028. .. code-block:: yaml
  1029. master_sign_key_name: <filename_without_suffix>
  1030. .. conf_master:: master_pubkey_signature
  1031. ``master_pubkey_signature``
  1032. ---------------------------
  1033. Default: ``master_pubkey_signature``
  1034. The name of the file in the master's pki-directory that holds the pre-calculated
  1035. signature of the master's public-key.
  1036. .. code-block:: yaml
  1037. master_pubkey_signature: <filename>
  1038. .. conf_master:: master_use_pubkey_signature
  1039. ``master_use_pubkey_signature``
  1040. -------------------------------
  1041. Default: ``False``
  1042. Instead of computing the signature for each auth-reply, use a pre-calculated
  1043. signature. The :conf_master:`master_pubkey_signature` must also be set for this.
  1044. .. code-block:: yaml
  1045. master_use_pubkey_signature: True
  1046. .. conf_master:: rotate_aes_key
  1047. ``rotate_aes_key``
  1048. ------------------
  1049. Default: ``True``
  1050. Rotate the salt-masters AES-key when a minion-public is deleted with salt-key.
  1051. This is a very important security-setting. Disabling it will enable deleted
  1052. minions to still listen in on the messages published by the salt-master.
  1053. Do not disable this unless it is absolutely clear what this does.
  1054. .. code-block:: yaml
  1055. rotate_aes_key: True
  1056. .. conf_master:: publish_session
  1057. ``publish_session``
  1058. -------------------
  1059. Default: ``86400``
  1060. The number of seconds between AES key rotations on the master.
  1061. .. code-block:: yaml
  1062. publish_session: Default: 86400
  1063. .. conf_master:: ssl
  1064. ``ssl``
  1065. -------
  1066. .. versionadded:: 2016.11.0
  1067. Default: ``None``
  1068. TLS/SSL connection options. This could be set to a dictionary containing
  1069. arguments corresponding to python ``ssl.wrap_socket`` method. For details see
  1070. `Tornado <http://www.tornadoweb.org/en/stable/tcpserver.html#tornado.tcpserver.TCPServer>`_
  1071. and `Python <http://docs.python.org/2/library/ssl.html#ssl.wrap_socket>`_
  1072. documentation.
  1073. Note: to set enum arguments values like ``cert_reqs`` and ``ssl_version`` use
  1074. constant names without ssl module prefix: ``CERT_REQUIRED`` or ``PROTOCOL_SSLv23``.
  1075. .. code-block:: yaml
  1076. ssl:
  1077. keyfile: <path_to_keyfile>
  1078. certfile: <path_to_certfile>
  1079. ssl_version: PROTOCOL_TLSv1_2
  1080. .. conf_master:: preserve_minion_cache
  1081. ``preserve_minion_cache``
  1082. -------------------------
  1083. Default: ``False``
  1084. By default, the master deletes its cache of minion data when the key for that
  1085. minion is removed. To preserve the cache after key deletion, set
  1086. ``preserve_minion_cache`` to True.
  1087. WARNING: This may have security implications if compromised minions auth with
  1088. a previous deleted minion ID.
  1089. .. code-block:: yaml
  1090. preserve_minion_cache: False
  1091. .. conf_master:: allow_minion_key_revoke
  1092. ``allow_minion_key_revoke``
  1093. ---------------------------
  1094. Default: ``True``
  1095. Controls whether a minion can request its own key revocation. When True
  1096. the master will honor the minion's request and revoke its key. When False,
  1097. the master will drop the request and the minion's key will remain accepted.
  1098. .. code-block:: yaml
  1099. allow_minion_key_revoke: False
  1100. .. conf_master:: optimization_order
  1101. ``optimization_order``
  1102. ----------------------
  1103. Default: ``[0, 1, 2]``
  1104. In cases where Salt is distributed without .py files, this option determines
  1105. the priority of optimization level(s) Salt's module loader should prefer.
  1106. .. note::
  1107. This option is only supported on Python 3.5+.
  1108. .. code-block:: yaml
  1109. optimization_order:
  1110. - 2
  1111. - 0
  1112. - 1
  1113. Master Large Scale Tuning Settings
  1114. ==================================
  1115. .. conf_master:: max_open_files
  1116. ``max_open_files``
  1117. ------------------
  1118. Default: ``100000``
  1119. Each minion connecting to the master uses AT LEAST one file descriptor, the
  1120. master subscription connection. If enough minions connect you might start
  1121. seeing on the console(and then salt-master crashes):
  1122. .. code-block:: bash
  1123. Too many open files (tcp_listener.cpp:335)
  1124. Aborted (core dumped)
  1125. .. code-block:: yaml
  1126. max_open_files: 100000
  1127. By default this value will be the one of `ulimit -Hn`, i.e., the hard limit for
  1128. max open files.
  1129. To set a different value than the default one, uncomment, and configure this
  1130. setting. Remember that this value CANNOT be higher than the hard limit. Raising
  1131. the hard limit depends on the OS and/or distribution, a good way to find the
  1132. limit is to search the internet for something like this:
  1133. .. code-block:: text
  1134. raise max open files hard limit debian
  1135. .. conf_master:: worker_threads
  1136. ``worker_threads``
  1137. ------------------
  1138. Default: ``5``
  1139. The number of threads to start for receiving commands and replies from minions.
  1140. If minions are stalling on replies because you have many minions, raise the
  1141. worker_threads value.
  1142. Worker threads should not be put below 3 when using the peer system, but can
  1143. drop down to 1 worker otherwise.
  1144. .. note::
  1145. When the master daemon starts, it is expected behaviour to see
  1146. multiple salt-master processes, even if 'worker_threads' is set to '1'. At
  1147. a minimum, a controlling process will start along with a Publisher, an
  1148. EventPublisher, and a number of MWorker processes will be started. The
  1149. number of MWorker processes is tuneable by the 'worker_threads'
  1150. configuration value while the others are not.
  1151. .. code-block:: yaml
  1152. worker_threads: 5
  1153. .. conf_master:: pub_hwm
  1154. ``pub_hwm``
  1155. -----------
  1156. Default: ``1000``
  1157. The zeromq high water mark on the publisher interface.
  1158. .. code-block:: yaml
  1159. pub_hwm: 1000
  1160. .. conf_master:: zmq_backlog
  1161. ``zmq_backlog``
  1162. ---------------
  1163. Default: ``1000``
  1164. The listen queue size of the ZeroMQ backlog.
  1165. .. code-block:: yaml
  1166. zmq_backlog: 1000
  1167. .. _master-module-management:
  1168. Master Module Management
  1169. ========================
  1170. .. conf_master:: runner_dirs
  1171. ``runner_dirs``
  1172. ---------------
  1173. Default: ``[]``
  1174. Set additional directories to search for runner modules.
  1175. .. code-block:: yaml
  1176. runner_dirs:
  1177. - /var/lib/salt/runners
  1178. .. conf_master:: utils_dirs
  1179. ``utils_dirs``
  1180. ---------------
  1181. .. versionadded:: 2018.3.0
  1182. Default: ``[]``
  1183. Set additional directories to search for util modules.
  1184. .. code-block:: yaml
  1185. utils_dirs:
  1186. - /var/lib/salt/utils
  1187. .. conf_master:: cython_enable
  1188. ``cython_enable``
  1189. -----------------
  1190. Default: ``False``
  1191. Set to true to enable Cython modules (.pyx files) to be compiled on the fly on
  1192. the Salt master.
  1193. .. code-block:: yaml
  1194. cython_enable: False
  1195. .. _master-state-system-settings:
  1196. Master State System Settings
  1197. ============================
  1198. .. conf_master:: state_top
  1199. ``state_top``
  1200. -------------
  1201. Default: ``top.sls``
  1202. The state system uses a "top" file to tell the minions what environment to
  1203. use and what modules to use. The state_top file is defined relative to the
  1204. root of the base environment. The value of "state_top" is also used for the
  1205. pillar top file
  1206. .. code-block:: yaml
  1207. state_top: top.sls
  1208. .. conf_master:: state_top_saltenv
  1209. ``state_top_saltenv``
  1210. ---------------------
  1211. This option has no default value. Set it to an environment name to ensure that
  1212. *only* the top file from that environment is considered during a
  1213. :ref:`highstate <running-highstate>`.
  1214. .. note::
  1215. Using this value does not change the merging strategy. For instance, if
  1216. :conf_master:`top_file_merging_strategy` is set to ``merge``, and
  1217. :conf_master:`state_top_saltenv` is set to ``foo``, then any sections for
  1218. environments other than ``foo`` in the top file for the ``foo`` environment
  1219. will be ignored. With :conf_master:`state_top_saltenv` set to ``base``, all
  1220. states from all environments in the ``base`` top file will be applied,
  1221. while all other top files are ignored. The only way to set
  1222. :conf_master:`state_top_saltenv` to something other than ``base`` and not
  1223. have the other environments in the targeted top file ignored, would be to
  1224. set :conf_master:`top_file_merging_strategy` to ``merge_all``.
  1225. .. code-block:: yaml
  1226. state_top_saltenv: dev
  1227. .. conf_master:: top_file_merging_strategy
  1228. ``top_file_merging_strategy``
  1229. -----------------------------
  1230. .. versionchanged:: 2016.11.0
  1231. A ``merge_all`` strategy has been added.
  1232. Default: ``merge``
  1233. When no specific fileserver environment (a.k.a. ``saltenv``) has been specified
  1234. for a :ref:`highstate <running-highstate>`, all environments' top files are
  1235. inspected. This config option determines how the SLS targets in those top files
  1236. are handled.
  1237. When set to ``merge``, the ``base`` environment's top file is evaluated first,
  1238. followed by the other environments' top files. The first target expression
  1239. (e.g. ``'*'``) for a given environment is kept, and when the same target
  1240. expression is used in a different top file evaluated later, it is ignored.
  1241. Because ``base`` is evaluated first, it is authoritative. For example, if there
  1242. is a target for ``'*'`` for the ``foo`` environment in both the ``base`` and
  1243. ``foo`` environment's top files, the one in the ``foo`` environment would be
  1244. ignored. The environments will be evaluated in no specific order (aside from
  1245. ``base`` coming first). For greater control over the order in which the
  1246. environments are evaluated, use :conf_master:`env_order`. Note that, aside from
  1247. the ``base`` environment's top file, any sections in top files that do not
  1248. match that top file's environment will be ignored. So, for example, a section
  1249. for the ``qa`` environment would be ignored if it appears in the ``dev``
  1250. environment's top file. To keep use cases like this from being ignored, use the
  1251. ``merge_all`` strategy.
  1252. When set to ``same``, then for each environment, only that environment's top
  1253. file is processed, with the others being ignored. For example, only the ``dev``
  1254. environment's top file will be processed for the ``dev`` environment, and any
  1255. SLS targets defined for ``dev`` in the ``base`` environment's (or any other
  1256. environment's) top file will be ignored. If an environment does not have a top
  1257. file, then the top file from the :conf_master:`default_top` config parameter
  1258. will be used as a fallback.
  1259. When set to ``merge_all``, then all states in all environments in all top files
  1260. will be applied. The order in which individual SLS files will be executed will
  1261. depend on the order in which the top files were evaluated, and the environments
  1262. will be evaluated in no specific order. For greater control over the order in
  1263. which the environments are evaluated, use :conf_master:`env_order`.
  1264. .. code-block:: yaml
  1265. top_file_merging_strategy: same
  1266. .. conf_master:: env_order
  1267. ``env_order``
  1268. -------------
  1269. Default: ``[]``
  1270. When :conf_master:`top_file_merging_strategy` is set to ``merge``, and no
  1271. environment is specified for a :ref:`highstate <running-highstate>`, this
  1272. config option allows for the order in which top files are evaluated to be
  1273. explicitly defined.
  1274. .. code-block:: yaml
  1275. env_order:
  1276. - base
  1277. - dev
  1278. - qa
  1279. .. conf_master:: master_tops
  1280. ``master_tops``
  1281. ---------------
  1282. Default: ``{}``
  1283. The master_tops option replaces the external_nodes option by creating
  1284. a pluggable system for the generation of external top data. The external_nodes
  1285. option is deprecated by the master_tops option.
  1286. To gain the capabilities of the classic external_nodes system, use the
  1287. following configuration:
  1288. .. code-block:: yaml
  1289. master_tops:
  1290. ext_nodes: <Shell command which returns yaml>
  1291. .. conf_master:: renderer
  1292. ``renderer``
  1293. ------------
  1294. Default: ``jinja|yaml``
  1295. The renderer to use on the minions to render the state data.
  1296. .. code-block:: yaml
  1297. renderer: jinja|json
  1298. .. conf_master:: userdata_template
  1299. ``userdata_template``
  1300. ---------------------
  1301. .. versionadded:: 2016.11.4
  1302. Default: ``None``
  1303. The renderer to use for templating userdata files in salt-cloud, if the
  1304. ``userdata_template`` is not set in the cloud profile. If no value is set in
  1305. the cloud profile or master config file, no templating will be performed.
  1306. .. code-block:: yaml
  1307. userdata_template: jinja
  1308. .. conf_master:: jinja_env
  1309. ``jinja_env``
  1310. -------------
  1311. .. versionadded:: 2018.3.0
  1312. Default: ``{}``
  1313. jinja_env overrides the default Jinja environment options for
  1314. **all templates except sls templates**.
  1315. To set the options for sls templates use :conf_master:`jinja_sls_env`.
  1316. .. note::
  1317. The `Jinja2 Environment documentation <http://jinja.pocoo.org/docs/api/#jinja2.Environment>`_ is the official source for the default values.
  1318. Not all the options listed in the jinja documentation can be overridden using :conf_master:`jinja_env` or :conf_master:`jinja_sls_env`.
  1319. The default options are:
  1320. .. code-block:: yaml
  1321. jinja_env:
  1322. block_start_string: '{%'
  1323. block_end_string: '%}'
  1324. variable_start_string: '{{'
  1325. variable_end_string: '}}'
  1326. comment_start_string: '{#'
  1327. comment_end_string: '#}'
  1328. line_statement_prefix:
  1329. line_comment_prefix:
  1330. trim_blocks: False
  1331. lstrip_blocks: False
  1332. newline_sequence: '\n'
  1333. keep_trailing_newline: False
  1334. .. conf_master:: jinja_sls_env
  1335. ``jinja_sls_env``
  1336. -----------------
  1337. .. versionadded:: 2018.3.0
  1338. Default: ``{}``
  1339. jinja_sls_env sets the Jinja environment options for **sls templates**.
  1340. The defaults and accepted options are exactly the same as they are
  1341. for :conf_master:`jinja_env`.
  1342. The default options are:
  1343. .. code-block:: yaml
  1344. jinja_sls_env:
  1345. block_start_string: '{%'
  1346. block_end_string: '%}'
  1347. variable_start_string: '{{'
  1348. variable_end_string: '}}'
  1349. comment_start_string: '{#'
  1350. comment_end_string: '#}'
  1351. line_statement_prefix:
  1352. line_comment_prefix:
  1353. trim_blocks: False
  1354. lstrip_blocks: False
  1355. newline_sequence: '\n'
  1356. keep_trailing_newline: False
  1357. Example using line statements and line comments to increase ease of use:
  1358. If your configuration options are
  1359. .. code-block:: yaml
  1360. jinja_sls_env:
  1361. line_statement_prefix: '%'
  1362. line_comment_prefix: '##'
  1363. With these options jinja will interpret anything after a ``%`` at the start of a line (ignoreing whitespace)
  1364. as a jinja statement and will interpret anything after a ``##`` as a comment.
  1365. This allows the following more convenient syntax to be used:
  1366. .. code-block:: jinja
  1367. ## (this comment will not stay once rendered)
  1368. # (this comment remains in the rendered template)
  1369. ## ensure all the formula services are running
  1370. % for service in formula_services:
  1371. enable_service_{{ service }}:
  1372. service.running:
  1373. name: {{ service }}
  1374. % endfor
  1375. The following less convenient but equivalent syntax would have to
  1376. be used if you had not set the line_statement and line_comment options:
  1377. .. code-block:: jinja
  1378. {# (this comment will not stay once rendered) #}
  1379. # (this comment remains in the rendered template)
  1380. {# ensure all the formula services are running #}
  1381. {% for service in formula_services %}
  1382. enable_service_{{ service }}:
  1383. service.running:
  1384. name: {{ service }}
  1385. {% endfor %}
  1386. .. conf_master:: jinja_trim_blocks
  1387. ``jinja_trim_blocks``
  1388. ---------------------
  1389. .. deprecated:: 2018.3.0
  1390. Replaced by :conf_master:`jinja_env` and :conf_master:`jinja_sls_env`
  1391. .. versionadded:: 2014.1.0
  1392. Default: ``False``
  1393. If this is set to ``True``, the first newline after a Jinja block is
  1394. removed (block, not variable tag!). Defaults to ``False`` and corresponds
  1395. to the Jinja environment init variable ``trim_blocks``.
  1396. .. code-block:: yaml
  1397. jinja_trim_blocks: False
  1398. .. conf_master:: jinja_lstrip_blocks
  1399. ``jinja_lstrip_blocks``
  1400. -----------------------
  1401. .. deprecated:: 2018.3.0
  1402. Replaced by :conf_master:`jinja_env` and :conf_master:`jinja_sls_env`
  1403. .. versionadded:: 2014.1.0
  1404. Default: ``False``
  1405. If this is set to ``True``, leading spaces and tabs are stripped from the
  1406. start of a line to a block. Defaults to ``False`` and corresponds to the
  1407. Jinja environment init variable ``lstrip_blocks``.
  1408. .. code-block:: yaml
  1409. jinja_lstrip_blocks: False
  1410. .. conf_master:: failhard
  1411. ``failhard``
  1412. ------------
  1413. Default: ``False``
  1414. Set the global failhard flag. This informs all states to stop running states
  1415. at the moment a single state fails.
  1416. .. code-block:: yaml
  1417. failhard: False
  1418. .. conf_master:: state_verbose
  1419. ``state_verbose``
  1420. -----------------
  1421. Default: ``True``
  1422. Controls the verbosity of state runs. By default, the results of all states are
  1423. returned, but setting this value to ``False`` will cause salt to only display
  1424. output for states that failed or states that have changes.
  1425. .. code-block:: yaml
  1426. state_verbose: False
  1427. .. conf_master:: state_output
  1428. ``state_output``
  1429. ----------------
  1430. Default: ``full``
  1431. The state_output setting controls which results will be output full multi line:
  1432. * ``full``, ``terse`` - each state will be full/terse
  1433. * ``mixed`` - only states with errors will be full
  1434. * ``changes`` - states with changes and errors will be full
  1435. ``full_id``, ``mixed_id``, ``changes_id`` and ``terse_id`` are also allowed;
  1436. when set, the state ID will be used as name in the output.
  1437. .. code-block:: yaml
  1438. state_output: full
  1439. .. conf_master:: state_output_diff
  1440. ``state_output_diff``
  1441. ---------------------
  1442. Default: ``False``
  1443. The state_output_diff setting changes whether or not the output from
  1444. successful states is returned. Useful when even the terse output of these
  1445. states is cluttering the logs. Set it to True to ignore them.
  1446. .. code-block:: yaml
  1447. state_output_diff: False
  1448. .. conf_master:: state_aggregate
  1449. ``state_aggregate``
  1450. -------------------
  1451. Default: ``False``
  1452. Automatically aggregate all states that have support for mod_aggregate by
  1453. setting to ``True``. Or pass a list of state module names to automatically
  1454. aggregate just those types.
  1455. .. code-block:: yaml
  1456. state_aggregate:
  1457. - pkg
  1458. .. code-block:: yaml
  1459. state_aggregate: True
  1460. .. conf_master:: state_events
  1461. ``state_events``
  1462. ----------------
  1463. Default: ``False``
  1464. Send progress events as each function in a state run completes execution
  1465. by setting to ``True``. Progress events are in the format
  1466. ``salt/job/<JID>/prog/<MID>/<RUN NUM>``.
  1467. .. code-block:: yaml
  1468. state_events: True
  1469. .. conf_master:: yaml_utf8
  1470. ``yaml_utf8``
  1471. -------------
  1472. Default: ``False``
  1473. Enable extra routines for YAML renderer used states containing UTF characters.
  1474. .. code-block:: yaml
  1475. yaml_utf8: False
  1476. ``runner_returns``
  1477. ------------------
  1478. Default: ``False``
  1479. If set to ``True``, runner jobs will be saved to job cache (defined by
  1480. :conf_master:`master_job_cache`).
  1481. .. code-block:: yaml
  1482. runner_returns: True
  1483. .. _master-file-server-settings:
  1484. Master File Server Settings
  1485. ===========================
  1486. .. conf_master:: fileserver_backend
  1487. ``fileserver_backend``
  1488. ----------------------
  1489. Default: ``['roots']``
  1490. Salt supports a modular fileserver backend system, this system allows the salt
  1491. master to link directly to third party systems to gather and manage the files
  1492. available to minions. Multiple backends can be configured and will be searched
  1493. for the requested file in the order in which they are defined here. The default
  1494. setting only enables the standard backend ``roots``, which is configured using
  1495. the :conf_master:`file_roots` option.
  1496. Example:
  1497. .. code-block:: yaml
  1498. fileserver_backend:
  1499. - roots
  1500. - gitfs
  1501. .. note::
  1502. For masterless Salt, this parameter must be specified in the minion config
  1503. file.
  1504. .. conf_master:: fileserver_followsymlinks
  1505. ``fileserver_followsymlinks``
  1506. -----------------------------
  1507. .. versionadded:: 2014.1.0
  1508. Default: ``True``
  1509. By default, the file_server follows symlinks when walking the filesystem tree.
  1510. Currently this only applies to the default roots fileserver_backend.
  1511. .. code-block:: yaml
  1512. fileserver_followsymlinks: True
  1513. .. conf_master:: fileserver_ignoresymlinks
  1514. ``fileserver_ignoresymlinks``
  1515. -----------------------------
  1516. .. versionadded:: 2014.1.0
  1517. Default: ``False``
  1518. If you do not want symlinks to be treated as the files they are pointing to,
  1519. set ``fileserver_ignoresymlinks`` to ``True``. By default this is set to
  1520. False. When set to ``True``, any detected symlink while listing files on the
  1521. Master will not be returned to the Minion.
  1522. .. code-block:: yaml
  1523. fileserver_ignoresymlinks: False
  1524. .. conf_master:: fileserver_limit_traversal
  1525. ``fileserver_limit_traversal``
  1526. ------------------------------
  1527. .. versionadded:: 2014.1.0
  1528. .. deprecated:: 2018.3.4
  1529. This option is now ignored. Firstly, it only traversed
  1530. :conf_master:`file_roots`, which means it did not work for the other
  1531. fileserver backends. Secondly, since this option was added we have added
  1532. caching to the code that traverses the file_roots (and gitfs, etc.), which
  1533. greatly reduces the amount of traversal that is done.
  1534. Default: ``False``
  1535. By default, the Salt fileserver recurses fully into all defined environments
  1536. to attempt to find files. To limit this behavior so that the fileserver only
  1537. traverses directories with SLS files and special Salt directories like _modules,
  1538. set ``fileserver_limit_traversal`` to ``True``. This might be useful for
  1539. installations where a file root has a very large number of files and performance
  1540. is impacted.
  1541. .. code-block:: yaml
  1542. fileserver_limit_traversal: False
  1543. .. conf_master:: fileserver_list_cache_time
  1544. ``fileserver_list_cache_time``
  1545. ------------------------------
  1546. .. versionadded:: 2014.1.0
  1547. .. versionchanged:: 2016.11.0
  1548. The default was changed from ``30`` seconds to ``20``.
  1549. Default: ``20``
  1550. Salt caches the list of files/symlinks/directories for each fileserver backend
  1551. and environment as they are requested, to guard against a performance
  1552. bottleneck at scale when many minions all ask the fileserver which files are
  1553. available simultaneously. This configuration parameter allows for the max age
  1554. of that cache to be altered.
  1555. Set this value to ``0`` to disable use of this cache altogether, but keep in
  1556. mind that this may increase the CPU load on the master when running a highstate
  1557. on a large number of minions.
  1558. .. note::
  1559. Rather than altering this configuration parameter, it may be advisable to
  1560. use the :mod:`fileserver.clear_file_list_cache
  1561. <salt.runners.fileserver.clear_file_list_cache>` runner to clear these
  1562. caches.
  1563. .. code-block:: yaml
  1564. fileserver_list_cache_time: 5
  1565. .. conf_master:: fileserver_verify_config
  1566. ``fileserver_verify_config``
  1567. ----------------------------
  1568. .. versionadded:: 2017.7.0
  1569. Default: ``True``
  1570. By default, as the master starts it performs some sanity checks on the
  1571. configured fileserver backends. If any of these sanity checks fail (such as
  1572. when an invalid configuration is used), the master daemon will abort.
  1573. To skip these sanity checks, set this option to ``False``.
  1574. .. code-block:: yaml
  1575. fileserver_verify_config: False
  1576. .. conf_master:: hash_type
  1577. ``hash_type``
  1578. -------------
  1579. Default: ``sha256``
  1580. The hash_type is the hash to use when discovering the hash of a file on
  1581. the master server. The default is sha256, but md5, sha1, sha224, sha384, and
  1582. sha512 are also supported.
  1583. .. code-block:: yaml
  1584. hash_type: sha256
  1585. .. conf_master:: file_buffer_size
  1586. ``file_buffer_size``
  1587. --------------------
  1588. Default: ``1048576``
  1589. The buffer size in the file server in bytes.
  1590. .. code-block:: yaml
  1591. file_buffer_size: 1048576
  1592. .. conf_master:: file_ignore_regex
  1593. ``file_ignore_regex``
  1594. ---------------------
  1595. Default: ``''``
  1596. A regular expression (or a list of expressions) that will be matched
  1597. against the file path before syncing the modules and states to the minions.
  1598. This includes files affected by the file.recurse state.
  1599. For example, if you manage your custom modules and states in subversion
  1600. and don't want all the '.svn' folders and content synced to your minions,
  1601. you could set this to '/\.svn($|/)'. By default nothing is ignored.
  1602. .. code-block:: yaml
  1603. file_ignore_regex:
  1604. - '/\.svn($|/)'
  1605. - '/\.git($|/)'
  1606. .. conf_master:: file_ignore_glob
  1607. ``file_ignore_glob``
  1608. --------------------
  1609. Default ``''``
  1610. A file glob (or list of file globs) that will be matched against the file
  1611. path before syncing the modules and states to the minions. This is similar
  1612. to file_ignore_regex above, but works on globs instead of regex. By default
  1613. nothing is ignored.
  1614. .. code-block:: yaml
  1615. file_ignore_glob:
  1616. - '\*.pyc'
  1617. - '\*/somefolder/\*.bak'
  1618. - '\*.swp'
  1619. .. note::
  1620. Vim's .swp files are a common cause of Unicode errors in
  1621. :py:func:`file.recurse <salt.states.file.recurse>` states which use
  1622. templating. Unless there is a good reason to distribute them via the
  1623. fileserver, it is good practice to include ``'\*.swp'`` in the
  1624. :conf_master:`file_ignore_glob`.
  1625. .. conf_master:: master_roots
  1626. ``master_roots``
  1627. ----------------
  1628. Default: ``/srv/salt-master``
  1629. A master-only copy of the :conf_master:`file_roots` dictionary, used by the
  1630. state compiler.
  1631. .. code-block:: yaml
  1632. master_roots: /srv/salt-master
  1633. roots: Master's Local File Server
  1634. ---------------------------------
  1635. .. conf_master:: file_roots
  1636. ``file_roots``
  1637. **************
  1638. Default:
  1639. .. code-block:: yaml
  1640. base:
  1641. - /srv/salt
  1642. Salt runs a lightweight file server written in ZeroMQ to deliver files to
  1643. minions. This file server is built into the master daemon and does not
  1644. require a dedicated port.
  1645. The file server works on environments passed to the master. Each environment
  1646. can have multiple root directories. The subdirectories in the multiple file
  1647. roots cannot match, otherwise the downloaded files will not be able to be
  1648. reliably ensured. A base environment is required to house the top file.
  1649. As of 2018.3.5 and 2019.2.1, it is possible to have `__env__` as a catch-all environment.
  1650. Example:
  1651. .. code-block:: yaml
  1652. file_roots:
  1653. base:
  1654. - /srv/salt
  1655. dev:
  1656. - /srv/salt/dev/services
  1657. - /srv/salt/dev/states
  1658. prod:
  1659. - /srv/salt/prod/services
  1660. - /srv/salt/prod/states
  1661. __env__:
  1662. - /srv/salt/default
  1663. .. note::
  1664. For masterless Salt, this parameter must be specified in the minion config
  1665. file.
  1666. .. conf_master:: roots_update_interval
  1667. ``roots_update_interval``
  1668. *************************
  1669. .. versionadded:: 2018.3.0
  1670. Default: ``60``
  1671. This option defines the update interval (in seconds) for
  1672. :conf_master:`file_roots`.
  1673. .. note::
  1674. Since ``file_roots`` consists of files local to the minion, the update
  1675. process for this fileserver backend just reaps the cache for this backend.
  1676. .. code-block:: yaml
  1677. roots_update_interval: 120
  1678. gitfs: Git Remote File Server Backend
  1679. -------------------------------------
  1680. .. conf_master:: gitfs_remotes
  1681. ``gitfs_remotes``
  1682. *****************
  1683. Default: ``[]``
  1684. When using the ``git`` fileserver backend at least one git remote needs to be
  1685. defined. The user running the salt master will need read access to the repo.
  1686. The repos will be searched in order to find the file requested by a client and
  1687. the first repo to have the file will return it. Branches and tags are
  1688. translated into salt environments.
  1689. .. code-block:: yaml
  1690. gitfs_remotes:
  1691. - git://github.com/saltstack/salt-states.git
  1692. - file:///var/git/saltmaster
  1693. .. note::
  1694. ``file://`` repos will be treated as a remote and copied into the master's
  1695. gitfs cache, so only the *local* refs for those repos will be exposed as
  1696. fileserver environments.
  1697. As of 2014.7.0, it is possible to have per-repo versions of several of the
  1698. gitfs configuration parameters. For more information, see the :ref:`GitFS
  1699. Walkthrough <gitfs-per-remote-config>`.
  1700. .. conf_master:: gitfs_provider
  1701. ``gitfs_provider``
  1702. ******************
  1703. .. versionadded:: 2014.7.0
  1704. Optional parameter used to specify the provider to be used for gitfs. More
  1705. information can be found in the :ref:`GitFS Walkthrough <gitfs-dependencies>`.
  1706. Must be either ``pygit2`` or ``gitpython``. If unset, then each will be tried
  1707. in that same order, and the first one with a compatible version installed will
  1708. be the provider that is used.
  1709. .. code-block:: yaml
  1710. gitfs_provider: gitpython
  1711. .. conf_master:: gitfs_ssl_verify
  1712. ``gitfs_ssl_verify``
  1713. ********************
  1714. Default: ``True``
  1715. Specifies whether or not to ignore SSL certificate errors when fetching from
  1716. the repositories configured in :conf_master:`gitfs_remotes`. The ``False``
  1717. setting is useful if you're using a git repo that uses a self-signed
  1718. certificate. However, keep in mind that setting this to anything other ``True``
  1719. is a considered insecure, and using an SSH-based transport (if available) may
  1720. be a better option.
  1721. .. code-block:: yaml
  1722. gitfs_ssl_verify: False
  1723. .. note::
  1724. pygit2 only supports disabling SSL verification in versions 0.23.2 and
  1725. newer.
  1726. .. versionchanged:: 2015.8.0
  1727. This option can now be configured on individual repositories as well. See
  1728. :ref:`here <gitfs-per-remote-config>` for more info.
  1729. .. versionchanged:: 2016.11.0
  1730. The default config value changed from ``False`` to ``True``.
  1731. .. conf_master:: gitfs_mountpoint
  1732. ``gitfs_mountpoint``
  1733. ********************
  1734. .. versionadded:: 2014.7.0
  1735. Default: ``''``
  1736. Specifies a path on the salt fileserver which will be prepended to all files
  1737. served by gitfs. This option can be used in conjunction with
  1738. :conf_master:`gitfs_root`. It can also be configured for an individual
  1739. repository, see :ref:`here <gitfs-per-remote-config>` for more info.
  1740. .. code-block:: yaml
  1741. gitfs_mountpoint: salt://foo/bar
  1742. .. note::
  1743. The ``salt://`` protocol designation can be left off (in other words,
  1744. ``foo/bar`` and ``salt://foo/bar`` are equivalent). Assuming a file
  1745. ``baz.sh`` in the root of a gitfs remote, and the above example mountpoint,
  1746. this file would be served up via ``salt://foo/bar/baz.sh``.
  1747. .. conf_master:: gitfs_root
  1748. ``gitfs_root``
  1749. **************
  1750. Default: ``''``
  1751. Relative path to a subdirectory within the repository from which Salt should
  1752. begin to serve files. This is useful when there are files in the repository
  1753. that should not be available to the Salt fileserver. Can be used in conjunction
  1754. with :conf_master:`gitfs_mountpoint`. If used, then from Salt's perspective the
  1755. directories above the one specified will be ignored and the relative path will
  1756. (for the purposes of gitfs) be considered as the root of the repo.
  1757. .. code-block:: yaml
  1758. gitfs_root: somefolder/otherfolder
  1759. .. versionchanged:: 2014.7.0
  1760. This option can now be configured on individual repositories as well. See
  1761. :ref:`here <gitfs-per-remote-config>` for more info.
  1762. .. conf_master:: gitfs_base
  1763. ``gitfs_base``
  1764. **************
  1765. Default: ``master``
  1766. Defines which branch/tag should be used as the ``base`` environment.
  1767. .. code-block:: yaml
  1768. gitfs_base: salt
  1769. .. versionchanged:: 2014.7.0
  1770. This option can now be configured on individual repositories as well. See
  1771. :ref:`here <gitfs-per-remote-config>` for more info.
  1772. .. conf_master:: gitfs_saltenv
  1773. ``gitfs_saltenv``
  1774. *****************
  1775. .. versionadded:: 2016.11.0
  1776. Default: ``[]``
  1777. Global settings for :ref:`per-saltenv configuration parameters
  1778. <gitfs-per-saltenv-config>`. Though per-saltenv configuration parameters are
  1779. typically one-off changes specific to a single gitfs remote, and thus more
  1780. often configured on a per-remote basis, this parameter can be used to specify
  1781. per-saltenv changes which should apply to all remotes. For example, the below
  1782. configuration will map the ``develop`` branch to the ``dev`` saltenv for all
  1783. gitfs remotes.
  1784. .. code-block:: yaml
  1785. gitfs_saltenv:
  1786. - dev:
  1787. - ref: develop
  1788. .. conf_master:: gitfs_disable_saltenv_mapping
  1789. ``gitfs_disable_saltenv_mapping``
  1790. *********************************
  1791. .. versionadded:: 2018.3.0
  1792. Default: ``False``
  1793. When set to ``True``, all saltenv mapping logic is disregarded (aside from
  1794. which branch/tag is mapped to the ``base`` saltenv). To use any other
  1795. environments, they must then be defined using :ref:`per-saltenv configuration
  1796. parameters <gitfs-per-saltenv-config>`.
  1797. .. code-block:: yaml
  1798. gitfs_disable_saltenv_mapping: True
  1799. .. note::
  1800. This is is a global configuration option, see :ref:`here
  1801. <gitfs-per-remote-config>` for examples of configuring it for individual
  1802. repositories.
  1803. .. conf_master:: gitfs_ref_types
  1804. ``gitfs_ref_types``
  1805. *******************
  1806. .. versionadded:: 2018.3.0
  1807. Default: ``['branch', 'tag', 'sha']``
  1808. This option defines what types of refs are mapped to fileserver environments
  1809. (i.e. saltenvs). It also sets the order of preference when there are
  1810. ambiguously-named refs (i.e. when a branch and tag both have the same name).
  1811. The below example disables mapping of both tags and SHAs, so that only branches
  1812. are mapped as saltenvs:
  1813. .. code-block:: yaml
  1814. gitfs_ref_types:
  1815. - branch
  1816. .. note::
  1817. This is is a global configuration option, see :ref:`here
  1818. <gitfs-per-remote-config>` for examples of configuring it for individual
  1819. repositories.
  1820. .. note::
  1821. ``sha`` is special in that it will not show up when listing saltenvs (e.g.
  1822. with the :py:func:`fileserver.envs <salt.runners.fileserver.envs>` runner),
  1823. but works within states and with :py:func:`cp.cache_file
  1824. <salt.modules.cp.cache_file>` to retrieve a file from a specific git SHA.
  1825. .. conf_master:: gitfs_saltenv_whitelist
  1826. ``gitfs_saltenv_whitelist``
  1827. ***************************
  1828. .. versionadded:: 2014.7.0
  1829. .. versionchanged:: 2018.3.0
  1830. Renamed from ``gitfs_env_whitelist`` to ``gitfs_saltenv_whitelist``
  1831. Default: ``[]``
  1832. Used to restrict which environments are made available. Can speed up state runs
  1833. if the repos in :conf_master:`gitfs_remotes` contain many branches/tags. More
  1834. information can be found in the :ref:`GitFS Walkthrough
  1835. <gitfs-whitelist-blacklist>`.
  1836. .. code-block:: yaml
  1837. gitfs_saltenv_whitelist:
  1838. - base
  1839. - v1.*
  1840. - 'mybranch\d+'
  1841. .. conf_master:: gitfs_saltenv_blacklist
  1842. ``gitfs_saltenv_blacklist``
  1843. ***************************
  1844. .. versionadded:: 2014.7.0
  1845. .. versionchanged:: 2018.3.0
  1846. Renamed from ``gitfs_env_blacklist`` to ``gitfs_saltenv_blacklist``
  1847. Default: ``[]``
  1848. Used to restrict which environments are made available. Can speed up state runs
  1849. if the repos in :conf_master:`gitfs_remotes` contain many branches/tags. More
  1850. information can be found in the :ref:`GitFS Walkthrough
  1851. <gitfs-whitelist-blacklist>`.
  1852. .. code-block:: yaml
  1853. gitfs_saltenv_blacklist:
  1854. - base
  1855. - v1.*
  1856. - 'mybranch\d+'
  1857. .. conf_master:: gitfs_global_lock
  1858. ``gitfs_global_lock``
  1859. *********************
  1860. .. versionadded:: 2015.8.9
  1861. Default: ``True``
  1862. When set to ``False``, if there is an update lock for a gitfs remote and the
  1863. pid written to it is not running on the master, the lock file will be
  1864. automatically cleared and a new lock will be obtained. When set to ``True``,
  1865. Salt will simply log a warning when there is an update lock present.
  1866. On single-master deployments, disabling this option can help automatically deal
  1867. with instances where the master was shutdown/restarted during the middle of a
  1868. gitfs update, leaving a update lock in place.
  1869. However, on multi-master deployments with the gitfs cachedir shared via
  1870. `GlusterFS`__, nfs, or another network filesystem, it is strongly recommended
  1871. not to disable this option as doing so will cause lock files to be removed if
  1872. they were created by a different master.
  1873. .. code-block:: yaml
  1874. # Disable global lock
  1875. gitfs_global_lock: False
  1876. .. __: http://www.gluster.org/
  1877. .. conf_master:: gitfs_update_interval
  1878. ``gitfs_update_interval``
  1879. *************************
  1880. .. versionadded:: 2018.3.0
  1881. Default: ``60``
  1882. This option defines the default update interval (in seconds) for gitfs remotes.
  1883. The update interval can also be set for a single repository via a
  1884. :ref:`per-remote config option <gitfs-per-remote-config>`
  1885. .. code-block:: yaml
  1886. gitfs_update_interval: 120
  1887. GitFS Authentication Options
  1888. ****************************
  1889. These parameters only currently apply to the pygit2 gitfs provider. Examples of
  1890. how to use these can be found in the :ref:`GitFS Walkthrough
  1891. <gitfs-authentication>`.
  1892. .. conf_master:: gitfs_user
  1893. ``gitfs_user``
  1894. ~~~~~~~~~~~~~~
  1895. .. versionadded:: 2014.7.0
  1896. Default: ``''``
  1897. Along with :conf_master:`gitfs_password`, is used to authenticate to HTTPS
  1898. remotes.
  1899. .. code-block:: yaml
  1900. gitfs_user: git
  1901. .. note::
  1902. This is is a global configuration option, see :ref:`here
  1903. <gitfs-per-remote-config>` for examples of configuring it for individual
  1904. repositories.
  1905. .. conf_master:: gitfs_password
  1906. ``gitfs_password``
  1907. ~~~~~~~~~~~~~~~~~~
  1908. .. versionadded:: 2014.7.0
  1909. Default: ``''``
  1910. Along with :conf_master:`gitfs_user`, is used to authenticate to HTTPS remotes.
  1911. This parameter is not required if the repository does not use authentication.
  1912. .. code-block:: yaml
  1913. gitfs_password: mypassword
  1914. .. note::
  1915. This is is a global configuration option, see :ref:`here
  1916. <gitfs-per-remote-config>` for examples of configuring it for individual
  1917. repositories.
  1918. .. conf_master:: gitfs_insecure_auth
  1919. ``gitfs_insecure_auth``
  1920. ~~~~~~~~~~~~~~~~~~~~~~~
  1921. .. versionadded:: 2014.7.0
  1922. Default: ``False``
  1923. By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
  1924. parameter enables authentication over HTTP. **Enable this at your own risk.**
  1925. .. code-block:: yaml
  1926. gitfs_insecure_auth: True
  1927. .. note::
  1928. This is is a global configuration option, see :ref:`here
  1929. <gitfs-per-remote-config>` for examples of configuring it for individual
  1930. repositories.
  1931. .. conf_master:: gitfs_pubkey
  1932. ``gitfs_pubkey``
  1933. ~~~~~~~~~~~~~~~~
  1934. .. versionadded:: 2014.7.0
  1935. Default: ``''``
  1936. Along with :conf_master:`gitfs_privkey` (and optionally
  1937. :conf_master:`gitfs_passphrase`), is used to authenticate to SSH remotes.
  1938. Required for SSH remotes.
  1939. .. code-block:: yaml
  1940. gitfs_pubkey: /path/to/key.pub
  1941. .. note::
  1942. This is is a global configuration option, see :ref:`here
  1943. <gitfs-per-remote-config>` for examples of configuring it for individual
  1944. repositories.
  1945. .. conf_master:: gitfs_privkey
  1946. ``gitfs_privkey``
  1947. ~~~~~~~~~~~~~~~~~
  1948. .. versionadded:: 2014.7.0
  1949. Default: ``''``
  1950. Along with :conf_master:`gitfs_pubkey` (and optionally
  1951. :conf_master:`gitfs_passphrase`), is used to authenticate to SSH remotes.
  1952. Required for SSH remotes.
  1953. .. code-block:: yaml
  1954. gitfs_privkey: /path/to/key
  1955. .. note::
  1956. This is is a global configuration option, see :ref:`here
  1957. <gitfs-per-remote-config>` for examples of configuring it for individual
  1958. repositories.
  1959. .. conf_master:: gitfs_passphrase
  1960. ``gitfs_passphrase``
  1961. ~~~~~~~~~~~~~~~~~~~~
  1962. .. versionadded:: 2014.7.0
  1963. Default: ``''``
  1964. This parameter is optional, required only when the SSH key being used to
  1965. authenticate is protected by a passphrase.
  1966. .. code-block:: yaml
  1967. gitfs_passphrase: mypassphrase
  1968. .. note::
  1969. This is is a global configuration option, see :ref:`here
  1970. <gitfs-per-remote-config>` for examples of configuring it for individual
  1971. repositories.
  1972. .. conf_master:: gitfs_refspecs
  1973. ``gitfs_refspecs``
  1974. ~~~~~~~~~~~~~~~~~~
  1975. .. versionadded:: 2017.7.0
  1976. Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']``
  1977. When fetching from remote repositories, by default Salt will fetch branches and
  1978. tags. This parameter can be used to override the default and specify
  1979. alternate refspecs to be fetched. More information on how this feature works
  1980. can be found in the :ref:`GitFS Walkthrough <gitfs-custom-refspecs>`.
  1981. .. code-block:: yaml
  1982. gitfs_refspecs:
  1983. - '+refs/heads/*:refs/remotes/origin/*'
  1984. - '+refs/tags/*:refs/tags/*'
  1985. - '+refs/pull/*/head:refs/remotes/origin/pr/*'
  1986. - '+refs/pull/*/merge:refs/remotes/origin/merge/*'
  1987. hgfs: Mercurial Remote File Server Backend
  1988. ------------------------------------------
  1989. .. conf_master:: hgfs_remotes
  1990. ``hgfs_remotes``
  1991. ****************
  1992. .. versionadded:: 0.17.0
  1993. Default: ``[]``
  1994. When using the ``hg`` fileserver backend at least one mercurial remote needs to
  1995. be defined. The user running the salt master will need read access to the repo.
  1996. The repos will be searched in order to find the file requested by a client and
  1997. the first repo to have the file will return it. Branches and/or bookmarks are
  1998. translated into salt environments, as defined by the
  1999. :conf_master:`hgfs_branch_method` parameter.
  2000. .. code-block:: yaml
  2001. hgfs_remotes:
  2002. - https://username@bitbucket.org/username/reponame
  2003. .. note::
  2004. As of 2014.7.0, it is possible to have per-repo versions of the
  2005. :conf_master:`hgfs_root`, :conf_master:`hgfs_mountpoint`,
  2006. :conf_master:`hgfs_base`, and :conf_master:`hgfs_branch_method` parameters.
  2007. For example:
  2008. .. code-block:: yaml
  2009. hgfs_remotes:
  2010. - https://username@bitbucket.org/username/repo1
  2011. - base: saltstates
  2012. - https://username@bitbucket.org/username/repo2:
  2013. - root: salt
  2014. - mountpoint: salt://foo/bar/baz
  2015. - https://username@bitbucket.org/username/repo3:
  2016. - root: salt/states
  2017. - branch_method: mixed
  2018. .. conf_master:: hgfs_branch_method
  2019. ``hgfs_branch_method``
  2020. **********************
  2021. .. versionadded:: 0.17.0
  2022. Default: ``branches``
  2023. Defines the objects that will be used as fileserver environments.
  2024. * ``branches`` - Only branches and tags will be used
  2025. * ``bookmarks`` - Only bookmarks and tags will be used
  2026. * ``mixed`` - Branches, bookmarks, and tags will be used
  2027. .. code-block:: yaml
  2028. hgfs_branch_method: mixed
  2029. .. note::
  2030. Starting in version 2014.1.0, the value of the :conf_master:`hgfs_base`
  2031. parameter defines which branch is used as the ``base`` environment,
  2032. allowing for a ``base`` environment to be used with an
  2033. :conf_master:`hgfs_branch_method` of ``bookmarks``.
  2034. Prior to this release, the ``default`` branch will be used as the ``base``
  2035. environment.
  2036. .. conf_master:: hgfs_mountpoint
  2037. ``hgfs_mountpoint``
  2038. *******************
  2039. .. versionadded:: 2014.7.0
  2040. Default: ``''``
  2041. Specifies a path on the salt fileserver which will be prepended to all files
  2042. served by hgfs. This option can be used in conjunction with
  2043. :conf_master:`hgfs_root`. It can also be configured on a per-remote basis, see
  2044. :conf_master:`here <hgfs_remotes>` for more info.
  2045. .. code-block:: yaml
  2046. hgfs_mountpoint: salt://foo/bar
  2047. .. note::
  2048. The ``salt://`` protocol designation can be left off (in other words,
  2049. ``foo/bar`` and ``salt://foo/bar`` are equivalent). Assuming a file
  2050. ``baz.sh`` in the root of an hgfs remote, this file would be served up via
  2051. ``salt://foo/bar/baz.sh``.
  2052. .. conf_master:: hgfs_root
  2053. ``hgfs_root``
  2054. *************
  2055. .. versionadded:: 0.17.0
  2056. Default: ``''``
  2057. Relative path to a subdirectory within the repository from which Salt should
  2058. begin to serve files. This is useful when there are files in the repository
  2059. that should not be available to the Salt fileserver. Can be used in conjunction
  2060. with :conf_master:`hgfs_mountpoint`. If used, then from Salt's perspective the
  2061. directories above the one specified will be ignored and the relative path will
  2062. (for the purposes of hgfs) be considered as the root of the repo.
  2063. .. code-block:: yaml
  2064. hgfs_root: somefolder/otherfolder
  2065. .. versionchanged:: 2014.7.0
  2066. Ability to specify hgfs roots on a per-remote basis was added. See
  2067. :conf_master:`here <hgfs_remotes>` for more info.
  2068. .. conf_master:: hgfs_base
  2069. ``hgfs_base``
  2070. *************
  2071. .. versionadded:: 2014.1.0
  2072. Default: ``default``
  2073. Defines which branch should be used as the ``base`` environment. Change this if
  2074. :conf_master:`hgfs_branch_method` is set to ``bookmarks`` to specify which
  2075. bookmark should be used as the ``base`` environment.
  2076. .. code-block:: yaml
  2077. hgfs_base: salt
  2078. .. conf_master:: hgfs_saltenv_whitelist
  2079. ``hgfs_saltenv_whitelist``
  2080. **************************
  2081. .. versionadded:: 2014.7.0
  2082. .. versionchanged:: 2018.3.0
  2083. Renamed from ``hgfs_env_whitelist`` to ``hgfs_saltenv_whitelist``
  2084. Default: ``[]``
  2085. Used to restrict which environments are made available. Can speed up state runs
  2086. if your hgfs remotes contain many branches/bookmarks/tags. Full names, globs,
  2087. and regular expressions are supported. If using a regular expression, the
  2088. expression must match the entire minion ID.
  2089. If used, only branches/bookmarks/tags which match one of the specified
  2090. expressions will be exposed as fileserver environments.
  2091. If used in conjunction with :conf_master:`hgfs_saltenv_blacklist`, then the subset
  2092. of branches/bookmarks/tags which match the whitelist but do *not* match the
  2093. blacklist will be exposed as fileserver environments.
  2094. .. code-block:: yaml
  2095. hgfs_saltenv_whitelist:
  2096. - base
  2097. - v1.*
  2098. - 'mybranch\d+'
  2099. .. conf_master:: hgfs_saltenv_blacklist
  2100. ``hgfs_saltenv_blacklist``
  2101. **************************
  2102. .. versionadded:: 2014.7.0
  2103. .. versionchanged:: 2018.3.0
  2104. Renamed from ``hgfs_env_blacklist`` to ``hgfs_saltenv_blacklist``
  2105. Default: ``[]``
  2106. Used to restrict which environments are made available. Can speed up state runs
  2107. if your hgfs remotes contain many branches/bookmarks/tags. Full names, globs,
  2108. and regular expressions are supported. If using a regular expression, the
  2109. expression must match the entire minion ID.
  2110. If used, branches/bookmarks/tags which match one of the specified expressions
  2111. will *not* be exposed as fileserver environments.
  2112. If used in conjunction with :conf_master:`hgfs_saltenv_whitelist`, then the subset
  2113. of branches/bookmarks/tags which match the whitelist but do *not* match the
  2114. blacklist will be exposed as fileserver environments.
  2115. .. code-block:: yaml
  2116. hgfs_saltenv_blacklist:
  2117. - base
  2118. - v1.*
  2119. - 'mybranch\d+'
  2120. .. conf_master:: hgfs_update_interval
  2121. ``hgfs_update_interval``
  2122. ************************
  2123. .. versionadded:: 2018.3.0
  2124. Default: ``60``
  2125. This option defines the update interval (in seconds) for
  2126. :conf_master:`hgfs_remotes`.
  2127. .. code-block:: yaml
  2128. hgfs_update_interval: 120
  2129. svnfs: Subversion Remote File Server Backend
  2130. --------------------------------------------
  2131. .. conf_master:: svnfs_remotes
  2132. ``svnfs_remotes``
  2133. *****************
  2134. .. versionadded:: 0.17.0
  2135. Default: ``[]``
  2136. When using the ``svn`` fileserver backend at least one subversion remote needs
  2137. to be defined. The user running the salt master will need read access to the
  2138. repo.
  2139. The repos will be searched in order to find the file requested by a client and
  2140. the first repo to have the file will return it. The trunk, branches, and tags
  2141. become environments, with the trunk being the ``base`` environment.
  2142. .. code-block:: yaml
  2143. svnfs_remotes:
  2144. - svn://foo.com/svn/myproject
  2145. .. note::
  2146. As of 2014.7.0, it is possible to have per-repo versions of the following
  2147. configuration parameters:
  2148. * :conf_master:`svnfs_root`
  2149. * :conf_master:`svnfs_mountpoint`
  2150. * :conf_master:`svnfs_trunk`
  2151. * :conf_master:`svnfs_branches`
  2152. * :conf_master:`svnfs_tags`
  2153. For example:
  2154. .. code-block:: yaml
  2155. svnfs_remotes:
  2156. - svn://foo.com/svn/project1
  2157. - svn://foo.com/svn/project2:
  2158. - root: salt
  2159. - mountpoint: salt://foo/bar/baz
  2160. - svn//foo.com/svn/project3:
  2161. - root: salt/states
  2162. - branches: branch
  2163. - tags: tag
  2164. .. conf_master:: svnfs_mountpoint
  2165. ``svnfs_mountpoint``
  2166. ********************
  2167. .. versionadded:: 2014.7.0
  2168. Default: ``''``
  2169. Specifies a path on the salt fileserver which will be prepended to all files
  2170. served by hgfs. This option can be used in conjunction with
  2171. :conf_master:`svnfs_root`. It can also be configured on a per-remote basis, see
  2172. :conf_master:`here <svnfs_remotes>` for more info.
  2173. .. code-block:: yaml
  2174. svnfs_mountpoint: salt://foo/bar
  2175. .. note::
  2176. The ``salt://`` protocol designation can be left off (in other words,
  2177. ``foo/bar`` and ``salt://foo/bar`` are equivalent). Assuming a file
  2178. ``baz.sh`` in the root of an svnfs remote, this file would be served up via
  2179. ``salt://foo/bar/baz.sh``.
  2180. .. conf_master:: svnfs_root
  2181. ``svnfs_root``
  2182. **************
  2183. .. versionadded:: 0.17.0
  2184. Default: ``''``
  2185. Relative path to a subdirectory within the repository from which Salt should
  2186. begin to serve files. This is useful when there are files in the repository
  2187. that should not be available to the Salt fileserver. Can be used in conjunction
  2188. with :conf_master:`svnfs_mountpoint`. If used, then from Salt's perspective the
  2189. directories above the one specified will be ignored and the relative path will
  2190. (for the purposes of svnfs) be considered as the root of the repo.
  2191. .. code-block:: yaml
  2192. svnfs_root: somefolder/otherfolder
  2193. .. versionchanged:: 2014.7.0
  2194. Ability to specify svnfs roots on a per-remote basis was added. See
  2195. :conf_master:`here <svnfs_remotes>` for more info.
  2196. .. conf_master:: svnfs_trunk
  2197. ``svnfs_trunk``
  2198. ***************
  2199. .. versionadded:: 2014.7.0
  2200. Default: ``trunk``
  2201. Path relative to the root of the repository where the trunk is located. Can
  2202. also be configured on a per-remote basis, see :conf_master:`here
  2203. <svnfs_remotes>` for more info.
  2204. .. code-block:: yaml
  2205. svnfs_trunk: trunk
  2206. .. conf_master:: svnfs_branches
  2207. ``svnfs_branches``
  2208. ******************
  2209. .. versionadded:: 2014.7.0
  2210. Default: ``branches``
  2211. Path relative to the root of the repository where the branches are located. Can
  2212. also be configured on a per-remote basis, see :conf_master:`here
  2213. <svnfs_remotes>` for more info.
  2214. .. code-block:: yaml
  2215. svnfs_branches: branches
  2216. .. conf_master:: svnfs_tags
  2217. ``svnfs_tags``
  2218. **************
  2219. .. versionadded:: 2014.7.0
  2220. Default: ``tags``
  2221. Path relative to the root of the repository where the tags are located. Can
  2222. also be configured on a per-remote basis, see :conf_master:`here
  2223. <svnfs_remotes>` for more info.
  2224. .. code-block:: yaml
  2225. svnfs_tags: tags
  2226. .. conf_master:: svnfs_saltenv_whitelist
  2227. ``svnfs_saltenv_whitelist``
  2228. ***************************
  2229. .. versionadded:: 2014.7.0
  2230. .. versionchanged:: 2018.3.0
  2231. Renamed from ``svnfs_env_whitelist`` to ``svnfs_saltenv_whitelist``
  2232. Default: ``[]``
  2233. Used to restrict which environments are made available. Can speed up state runs
  2234. if your svnfs remotes contain many branches/tags. Full names, globs, and
  2235. regular expressions are supported. If using a regular expression, the expression
  2236. must match the entire minion ID.
  2237. If used, only branches/tags which match one of the specified expressions will
  2238. be exposed as fileserver environments.
  2239. If used in conjunction with :conf_master:`svnfs_saltenv_blacklist`, then the subset
  2240. of branches/tags which match the whitelist but do *not* match the blacklist
  2241. will be exposed as fileserver environments.
  2242. .. code-block:: yaml
  2243. svnfs_saltenv_whitelist:
  2244. - base
  2245. - v1.*
  2246. - 'mybranch\d+'
  2247. .. conf_master:: svnfs_saltenv_blacklist
  2248. ``svnfs_saltenv_blacklist``
  2249. ***************************
  2250. .. versionadded:: 2014.7.0
  2251. .. versionchanged:: 2018.3.0
  2252. Renamed from ``svnfs_env_blacklist`` to ``svnfs_saltenv_blacklist``
  2253. Default: ``[]``
  2254. Used to restrict which environments are made available. Can speed up state runs
  2255. if your svnfs remotes contain many branches/tags. Full names, globs, and
  2256. regular expressions are supported. If using a regular expression, the
  2257. expression must match the entire minion ID.
  2258. If used, branches/tags which match one of the specified expressions will *not*
  2259. be exposed as fileserver environments.
  2260. If used in conjunction with :conf_master:`svnfs_saltenv_whitelist`, then the subset
  2261. of branches/tags which match the whitelist but do *not* match the blacklist
  2262. will be exposed as fileserver environments.
  2263. .. code-block:: yaml
  2264. svnfs_saltenv_blacklist:
  2265. - base
  2266. - v1.*
  2267. - 'mybranch\d+'
  2268. .. conf_master:: svnfs_update_interval
  2269. ``svnfs_update_interval``
  2270. *************************
  2271. .. versionadded:: 2018.3.0
  2272. Default: ``60``
  2273. This option defines the update interval (in seconds) for
  2274. :conf_master:`svnfs_remotes`.
  2275. .. code-block:: yaml
  2276. svnfs_update_interval: 120
  2277. minionfs: MinionFS Remote File Server Backend
  2278. ---------------------------------------------
  2279. .. conf_master:: minionfs_env
  2280. ``minionfs_env``
  2281. ****************
  2282. .. versionadded:: 2014.7.0
  2283. Default: ``base``
  2284. Environment from which MinionFS files are made available.
  2285. .. code-block:: yaml
  2286. minionfs_env: minionfs
  2287. .. conf_master:: minionfs_mountpoint
  2288. ``minionfs_mountpoint``
  2289. ***********************
  2290. .. versionadded:: 2014.7.0
  2291. Default: ``''``
  2292. Specifies a path on the salt fileserver from which minionfs files are served.
  2293. .. code-block:: yaml
  2294. minionfs_mountpoint: salt://foo/bar
  2295. .. note::
  2296. The ``salt://`` protocol designation can be left off (in other words,
  2297. ``foo/bar`` and ``salt://foo/bar`` are equivalent).
  2298. .. conf_master:: minionfs_whitelist
  2299. ``minionfs_whitelist``
  2300. **********************
  2301. .. versionadded:: 2014.7.0
  2302. Default: ``[]``
  2303. Used to restrict which minions' pushed files are exposed via minionfs. If using
  2304. a regular expression, the expression must match the entire minion ID.
  2305. If used, only the pushed files from minions which match one of the specified
  2306. expressions will be exposed.
  2307. If used in conjunction with :conf_master:`minionfs_blacklist`, then the subset
  2308. of hosts which match the whitelist but do *not* match the blacklist will be
  2309. exposed.
  2310. .. code-block:: yaml
  2311. minionfs_whitelist:
  2312. - server01
  2313. - dev*
  2314. - 'mail\d+.mydomain.tld'
  2315. .. conf_master:: minionfs_blacklist
  2316. ``minionfs_blacklist``
  2317. **********************
  2318. .. versionadded:: 2014.7.0
  2319. Default: ``[]``
  2320. Used to restrict which minions' pushed files are exposed via minionfs. If using
  2321. a regular expression, the expression must match the entire minion ID.
  2322. If used, only the pushed files from minions which match one of the specified
  2323. expressions will *not* be exposed.
  2324. If used in conjunction with :conf_master:`minionfs_whitelist`, then the subset
  2325. of hosts which match the whitelist but do *not* match the blacklist will be
  2326. exposed.
  2327. .. code-block:: yaml
  2328. minionfs_blacklist:
  2329. - server01
  2330. - dev*
  2331. - 'mail\d+.mydomain.tld'
  2332. .. conf_master:: minionfs_update_interval
  2333. ``minionfs_update_interval``
  2334. ****************************
  2335. .. versionadded:: 2018.3.0
  2336. Default: ``60``
  2337. This option defines the update interval (in seconds) for :ref:`MinionFS
  2338. <tutorial-minionfs>`.
  2339. .. note::
  2340. Since :ref:`MinionFS <tutorial-minionfs>` consists of files local to the
  2341. master, the update process for this fileserver backend just reaps the cache
  2342. for this backend.
  2343. .. code-block:: yaml
  2344. minionfs_update_interval: 120
  2345. azurefs: Azure File Server Backend
  2346. ----------------------------------
  2347. .. versionadded:: 2015.8.0
  2348. See the :mod:`azurefs documentation <salt.fileserver.azurefs>` for usage
  2349. examples.
  2350. .. conf_master:: azurefs_update_interval
  2351. ``azurefs_update_interval``
  2352. ***************************
  2353. .. versionadded:: 2018.3.0
  2354. Default: ``60``
  2355. This option defines the update interval (in seconds) for azurefs.
  2356. .. code-block:: yaml
  2357. azurefs_update_interval: 120
  2358. s3fs: S3 File Server Backend
  2359. ----------------------------
  2360. .. versionadded:: 0.16.0
  2361. See the :mod:`s3fs documentation <salt.fileserver.s3fs>` for usage examples.
  2362. .. conf_master:: s3fs_update_interval
  2363. ``s3fs_update_interval``
  2364. ************************
  2365. .. versionadded:: 2018.3.0
  2366. Default: ``60``
  2367. This option defines the update interval (in seconds) for s3fs.
  2368. .. code-block:: yaml
  2369. s3fs_update_interval: 120
  2370. .. _pillar-configuration-master:
  2371. Pillar Configuration
  2372. ====================
  2373. .. conf_master:: pillar_roots
  2374. ``pillar_roots``
  2375. ----------------
  2376. Default:
  2377. .. code-block:: yaml
  2378. base:
  2379. - /srv/pillar
  2380. Set the environments and directories used to hold pillar sls data. This
  2381. configuration is the same as :conf_master:`file_roots`:
  2382. .. code-block:: yaml
  2383. pillar_roots:
  2384. base:
  2385. - /srv/pillar
  2386. dev:
  2387. - /srv/pillar/dev
  2388. prod:
  2389. - /srv/pillar/prod
  2390. .. conf_master:: on_demand_ext_pillar
  2391. ``on_demand_ext_pillar``
  2392. ------------------------
  2393. .. versionadded:: 2016.3.6,2016.11.3,2017.7.0
  2394. Default: ``['libvirt', 'virtkey']``
  2395. The external pillars permitted to be used on-demand using :py:func:`pillar.ext
  2396. <salt.modules.pillar.ext>`.
  2397. .. code-block:: yaml
  2398. on_demand_ext_pillar:
  2399. - libvirt
  2400. - virtkey
  2401. - git
  2402. .. warning::
  2403. This will allow minions to request specific pillar data via
  2404. :py:func:`pillar.ext <salt.modules.pillar.ext>`, and may be considered a
  2405. security risk. However, pillar data generated in this way will not affect
  2406. the :ref:`in-memory pillar data <pillar-in-memory>`, so this risk is
  2407. limited to instances in which states/modules/etc. (built-in or custom) rely
  2408. upon pillar data generated by :py:func:`pillar.ext
  2409. <salt.modules.pillar.ext>`.
  2410. .. conf_master:: decrypt_pillar
  2411. ``decrypt_pillar``
  2412. ------------------
  2413. .. versionadded:: 2017.7.0
  2414. Default: ``[]``
  2415. A list of paths to be recursively decrypted during pillar compilation.
  2416. .. code-block:: yaml
  2417. decrypt_pillar:
  2418. - 'foo:bar': gpg
  2419. - 'lorem:ipsum:dolor'
  2420. Entries in this list can be formatted either as a simple string, or as a
  2421. key/value pair, with the key being the pillar location, and the value being the
  2422. renderer to use for pillar decryption. If the former is used, the renderer
  2423. specified by :conf_master:`decrypt_pillar_default` will be used.
  2424. .. conf_master:: decrypt_pillar_delimiter
  2425. ``decrypt_pillar_delimiter``
  2426. ----------------------------
  2427. .. versionadded:: 2017.7.0
  2428. Default: ``:``
  2429. The delimiter used to distinguish nested data structures in the
  2430. :conf_master:`decrypt_pillar` option.
  2431. .. code-block:: yaml
  2432. decrypt_pillar_delimiter: '|'
  2433. decrypt_pillar:
  2434. - 'foo|bar': gpg
  2435. - 'lorem|ipsum|dolor'
  2436. .. conf_master:: decrypt_pillar_default
  2437. ``decrypt_pillar_default``
  2438. --------------------------
  2439. .. versionadded:: 2017.7.0
  2440. Default: ``gpg``
  2441. The default renderer used for decryption, if one is not specified for a given
  2442. pillar key in :conf_master:`decrypt_pillar`.
  2443. .. code-block:: yaml
  2444. decrypt_pillar_default: my_custom_renderer
  2445. .. conf_master:: decrypt_pillar_renderers
  2446. ``decrypt_pillar_renderers``
  2447. ----------------------------
  2448. .. versionadded:: 2017.7.0
  2449. Default: ``['gpg']``
  2450. List of renderers which are permitted to be used for pillar decryption.
  2451. .. code-block:: yaml
  2452. decrypt_pillar_renderers:
  2453. - gpg
  2454. - my_custom_renderer
  2455. .. conf_master:: pillar_opts
  2456. ``pillar_opts``
  2457. ---------------
  2458. Default: ``False``
  2459. The ``pillar_opts`` option adds the master configuration file data to a dict in
  2460. the pillar called ``master``. This can be used to set simple configurations in
  2461. the master config file that can then be used on minions.
  2462. Note that setting this option to ``True`` means the master config file will be
  2463. included in all minion's pillars. While this makes global configuration of services
  2464. and systems easy, it may not be desired if sensitive data is stored in the master
  2465. configuration.
  2466. .. code-block:: yaml
  2467. pillar_opts: False
  2468. .. conf_master:: pillar_safe_render_error
  2469. ``pillar_safe_render_error``
  2470. ----------------------------
  2471. Default: ``True``
  2472. The pillar_safe_render_error option prevents the master from passing pillar
  2473. render errors to the minion. This is set on by default because the error could
  2474. contain templating data which would give that minion information it shouldn't
  2475. have, like a password! When set ``True`` the error message will only show:
  2476. .. code-block:: shell
  2477. Rendering SLS 'my.sls' failed. Please see master log for details.
  2478. .. code-block:: yaml
  2479. pillar_safe_render_error: True
  2480. .. _master-configuration-ext-pillar:
  2481. .. conf_master:: ext_pillar
  2482. ``ext_pillar``
  2483. --------------
  2484. The ext_pillar option allows for any number of external pillar interfaces to be
  2485. called when populating pillar data. The configuration is based on ext_pillar
  2486. functions. The available ext_pillar functions can be found herein:
  2487. :blob:`salt/pillar`
  2488. By default, the ext_pillar interface is not configured to run.
  2489. Default: ``[]``
  2490. .. code-block:: yaml
  2491. ext_pillar:
  2492. - hiera: /etc/hiera.yaml
  2493. - cmd_yaml: cat /etc/salt/yaml
  2494. - reclass:
  2495. inventory_base_uri: /etc/reclass
  2496. There are additional details at :ref:`salt-pillars`
  2497. .. conf_master:: ext_pillar_first
  2498. ``ext_pillar_first``
  2499. --------------------
  2500. .. versionadded:: 2015.5.0
  2501. Default: ``False``
  2502. This option allows for external pillar sources to be evaluated before
  2503. :conf_master:`pillar_roots`. External pillar data is evaluated separately from
  2504. :conf_master:`pillar_roots` pillar data, and then both sets of pillar data are
  2505. merged into a single pillar dictionary, so the value of this config option will
  2506. have an impact on which key "wins" when there is one of the same name in both
  2507. the external pillar data and :conf_master:`pillar_roots` pillar data. By
  2508. setting this option to ``True``, ext_pillar keys will be overridden by
  2509. :conf_master:`pillar_roots`, while leaving it as ``False`` will allow
  2510. ext_pillar keys to override those from :conf_master:`pillar_roots`.
  2511. .. note::
  2512. For a while, this config option did not work as specified above, because of
  2513. a bug in Pillar compilation. This bug has been resolved in version 2016.3.4
  2514. and later.
  2515. .. code-block:: yaml
  2516. ext_pillar_first: False
  2517. .. conf_minion:: pillarenv_from_saltenv
  2518. ``pillarenv_from_saltenv``
  2519. --------------------------
  2520. Default: ``False``
  2521. When set to ``True``, the :conf_master:`pillarenv` value will assume the value
  2522. of the effective saltenv when running states. This essentially makes ``salt-run
  2523. pillar.show_pillar saltenv=dev`` equivalent to ``salt-run pillar.show_pillar
  2524. saltenv=dev pillarenv=dev``. If :conf_master:`pillarenv` is set on the CLI, it
  2525. will override this option.
  2526. .. code-block:: yaml
  2527. pillarenv_from_saltenv: True
  2528. .. note::
  2529. For salt remote execution commands this option should be set in the Minion
  2530. configuration instead.
  2531. .. conf_master:: pillar_raise_on_missing
  2532. ``pillar_raise_on_missing``
  2533. ---------------------------
  2534. .. versionadded:: 2015.5.0
  2535. Default: ``False``
  2536. Set this option to ``True`` to force a ``KeyError`` to be raised whenever an
  2537. attempt to retrieve a named value from pillar fails. When this option is set
  2538. to ``False``, the failed attempt returns an empty string.
  2539. .. _git-pillar-config-opts:
  2540. Git External Pillar (git_pillar) Configuration Options
  2541. ------------------------------------------------------
  2542. .. conf_master:: git_pillar_provider
  2543. ``git_pillar_provider``
  2544. ***********************
  2545. .. versionadded:: 2015.8.0
  2546. Specify the provider to be used for git_pillar. Must be either ``pygit2`` or
  2547. ``gitpython``. If unset, then both will be tried in that same order, and the
  2548. first one with a compatible version installed will be the provider that is
  2549. used.
  2550. .. code-block:: yaml
  2551. git_pillar_provider: gitpython
  2552. .. conf_master:: git_pillar_base
  2553. ``git_pillar_base``
  2554. *******************
  2555. .. versionadded:: 2015.8.0
  2556. Default: ``master``
  2557. If the desired branch matches this value, and the environment is omitted from
  2558. the git_pillar configuration, then the environment for that git_pillar remote
  2559. will be ``base``. For example, in the configuration below, the ``foo``
  2560. branch/tag would be assigned to the ``base`` environment, while ``bar`` would
  2561. be mapped to the ``bar`` environment.
  2562. .. code-block:: yaml
  2563. git_pillar_base: foo
  2564. ext_pillar:
  2565. - git:
  2566. - foo https://mygitserver/git-pillar.git
  2567. - bar https://mygitserver/git-pillar.git
  2568. .. conf_master:: git_pillar_branch
  2569. ``git_pillar_branch``
  2570. *********************
  2571. .. versionadded:: 2015.8.0
  2572. Default: ``master``
  2573. If the branch is omitted from a git_pillar remote, then this branch will be
  2574. used instead. For example, in the configuration below, the first two remotes
  2575. would use the ``pillardata`` branch/tag, while the third would use the ``foo``
  2576. branch/tag.
  2577. .. code-block:: yaml
  2578. git_pillar_branch: pillardata
  2579. ext_pillar:
  2580. - git:
  2581. - https://mygitserver/pillar1.git
  2582. - https://mygitserver/pillar2.git:
  2583. - root: pillar
  2584. - foo https://mygitserver/pillar3.git
  2585. .. conf_master:: git_pillar_env
  2586. ``git_pillar_env``
  2587. ******************
  2588. .. versionadded:: 2015.8.0
  2589. Default: ``''`` (unset)
  2590. Environment to use for git_pillar remotes. This is normally derived from the
  2591. branch/tag (or from a per-remote ``env`` parameter), but if set this will
  2592. override the process of deriving the env from the branch/tag name. For example,
  2593. in the configuration below the ``foo`` branch would be assigned to the ``base``
  2594. environment, while the ``bar`` branch would need to explicitly have ``bar``
  2595. configured as it's environment to keep it from also being mapped to the
  2596. ``base`` environment.
  2597. .. code-block:: yaml
  2598. git_pillar_env: base
  2599. ext_pillar:
  2600. - git:
  2601. - foo https://mygitserver/git-pillar.git
  2602. - bar https://mygitserver/git-pillar.git:
  2603. - env: bar
  2604. For this reason, this option is recommended to be left unset, unless the use
  2605. case calls for all (or almost all) of the git_pillar remotes to use the same
  2606. environment irrespective of the branch/tag being used.
  2607. .. conf_master:: git_pillar_root
  2608. ``git_pillar_root``
  2609. *******************
  2610. .. versionadded:: 2015.8.0
  2611. Default: ``''``
  2612. Path relative to the root of the repository where the git_pillar top file and
  2613. SLS files are located. In the below configuration, the pillar top file and SLS
  2614. files would be looked for in a subdirectory called ``pillar``.
  2615. .. code-block:: yaml
  2616. git_pillar_root: pillar
  2617. ext_pillar:
  2618. - git:
  2619. - master https://mygitserver/pillar1.git
  2620. - master https://mygitserver/pillar2.git
  2621. .. note::
  2622. This is a global option. If only one or two repos need to have their files
  2623. sourced from a subdirectory, then :conf_master:`git_pillar_root` can be
  2624. omitted and the root can be specified on a per-remote basis, like so:
  2625. .. code-block:: yaml
  2626. ext_pillar:
  2627. - git:
  2628. - master https://mygitserver/pillar1.git
  2629. - master https://mygitserver/pillar2.git:
  2630. - root: pillar
  2631. In this example, for the first remote the top file and SLS files would be
  2632. looked for in the root of the repository, while in the second remote the
  2633. pillar data would be retrieved from the ``pillar`` subdirectory.
  2634. .. conf_master:: git_pillar_ssl_verify
  2635. ``git_pillar_ssl_verify``
  2636. *************************
  2637. .. versionadded:: 2015.8.0
  2638. .. versionchanged:: 2016.11.0
  2639. Default: ``False``
  2640. Specifies whether or not to ignore SSL certificate errors when contacting the
  2641. remote repository. The ``False`` setting is useful if you're using a
  2642. git repo that uses a self-signed certificate. However, keep in mind that
  2643. setting this to anything other ``True`` is a considered insecure, and using an
  2644. SSH-based transport (if available) may be a better option.
  2645. In the 2016.11.0 release, the default config value changed from ``False`` to
  2646. ``True``.
  2647. .. code-block:: yaml
  2648. git_pillar_ssl_verify: True
  2649. .. note::
  2650. pygit2 only supports disabling SSL verification in versions 0.23.2 and
  2651. newer.
  2652. .. conf_master:: git_pillar_global_lock
  2653. ``git_pillar_global_lock``
  2654. **************************
  2655. .. versionadded:: 2015.8.9
  2656. Default: ``True``
  2657. When set to ``False``, if there is an update/checkout lock for a git_pillar
  2658. remote and the pid written to it is not running on the master, the lock file
  2659. will be automatically cleared and a new lock will be obtained. When set to
  2660. ``True``, Salt will simply log a warning when there is an lock present.
  2661. On single-master deployments, disabling this option can help automatically deal
  2662. with instances where the master was shutdown/restarted during the middle of a
  2663. git_pillar update/checkout, leaving a lock in place.
  2664. However, on multi-master deployments with the git_pillar cachedir shared via
  2665. `GlusterFS`__, nfs, or another network filesystem, it is strongly recommended
  2666. not to disable this option as doing so will cause lock files to be removed if
  2667. they were created by a different master.
  2668. .. code-block:: yaml
  2669. # Disable global lock
  2670. git_pillar_global_lock: False
  2671. .. __: http://www.gluster.org/
  2672. .. conf_master:: git_pillar_includes
  2673. ``git_pillar_includes``
  2674. ***********************
  2675. .. versionadded:: 2017.7.0
  2676. Default: ``True``
  2677. Normally, when processing :ref:`git_pillar remotes
  2678. <git-pillar-configuration>`, if more than one repo under the same ``git``
  2679. section in the ``ext_pillar`` configuration refers to the same pillar
  2680. environment, then each repo in a given environment will have access to the
  2681. other repos' files to be referenced in their top files. However, it may be
  2682. desirable to disable this behavior. If so, set this value to ``False``.
  2683. For a more detailed examination of how includes work, see :ref:`this
  2684. explanation <git-pillar-multiple-remotes>` from the git_pillar documentation.
  2685. .. code-block:: yaml
  2686. git_pillar_includes: False
  2687. .. _git-ext-pillar-auth-opts:
  2688. Git External Pillar Authentication Options
  2689. ******************************************
  2690. These parameters only currently apply to the ``pygit2``
  2691. :conf_master:`git_pillar_provider`. Authentication works the same as it does
  2692. in gitfs, as outlined in the :ref:`GitFS Walkthrough <gitfs-authentication>`,
  2693. though the global configuration options are named differently to reflect that
  2694. they are for git_pillar instead of gitfs.
  2695. .. conf_master:: git_pillar_user
  2696. ``git_pillar_user``
  2697. ~~~~~~~~~~~~~~~~~~~
  2698. .. versionadded:: 2015.8.0
  2699. Default: ``''``
  2700. Along with :conf_master:`git_pillar_password`, is used to authenticate to HTTPS
  2701. remotes.
  2702. .. code-block:: yaml
  2703. git_pillar_user: git
  2704. .. conf_master:: git_pillar_password
  2705. ``git_pillar_password``
  2706. ~~~~~~~~~~~~~~~~~~~~~~~
  2707. .. versionadded:: 2015.8.0
  2708. Default: ``''``
  2709. Along with :conf_master:`git_pillar_user`, is used to authenticate to HTTPS
  2710. remotes. This parameter is not required if the repository does not use
  2711. authentication.
  2712. .. code-block:: yaml
  2713. git_pillar_password: mypassword
  2714. .. conf_master:: git_pillar_insecure_auth
  2715. ``git_pillar_insecure_auth``
  2716. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2717. .. versionadded:: 2015.8.0
  2718. Default: ``False``
  2719. By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
  2720. parameter enables authentication over HTTP. **Enable this at your own risk.**
  2721. .. code-block:: yaml
  2722. git_pillar_insecure_auth: True
  2723. .. conf_master:: git_pillar_pubkey
  2724. ``git_pillar_pubkey``
  2725. ~~~~~~~~~~~~~~~~~~~~~
  2726. .. versionadded:: 2015.8.0
  2727. Default: ``''``
  2728. Along with :conf_master:`git_pillar_privkey` (and optionally
  2729. :conf_master:`git_pillar_passphrase`), is used to authenticate to SSH remotes.
  2730. .. code-block:: yaml
  2731. git_pillar_pubkey: /path/to/key.pub
  2732. .. conf_master:: git_pillar_privkey
  2733. ``git_pillar_privkey``
  2734. ~~~~~~~~~~~~~~~~~~~~~~
  2735. .. versionadded:: 2015.8.0
  2736. Default: ``''``
  2737. Along with :conf_master:`git_pillar_pubkey` (and optionally
  2738. :conf_master:`git_pillar_passphrase`), is used to authenticate to SSH remotes.
  2739. .. code-block:: yaml
  2740. git_pillar_privkey: /path/to/key
  2741. .. conf_master:: git_pillar_passphrase
  2742. ``git_pillar_passphrase``
  2743. ~~~~~~~~~~~~~~~~~~~~~~~~~
  2744. .. versionadded:: 2015.8.0
  2745. Default: ``''``
  2746. This parameter is optional, required only when the SSH key being used to
  2747. authenticate is protected by a passphrase.
  2748. .. code-block:: yaml
  2749. git_pillar_passphrase: mypassphrase
  2750. .. conf_master:: git_pillar_refspecs
  2751. ``git_pillar_refspecs``
  2752. ~~~~~~~~~~~~~~~~~~~~~~~
  2753. .. versionadded:: 2017.7.0
  2754. Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']``
  2755. When fetching from remote repositories, by default Salt will fetch branches and
  2756. tags. This parameter can be used to override the default and specify
  2757. alternate refspecs to be fetched. This parameter works similarly to its
  2758. :ref:`GitFS counterpart <gitfs-custom-refspecs>`, in that it can be
  2759. configured both globally and for individual remotes.
  2760. .. code-block:: yaml
  2761. git_pillar_refspecs:
  2762. - '+refs/heads/*:refs/remotes/origin/*'
  2763. - '+refs/tags/*:refs/tags/*'
  2764. - '+refs/pull/*/head:refs/remotes/origin/pr/*'
  2765. - '+refs/pull/*/merge:refs/remotes/origin/merge/*'
  2766. .. conf_master:: git_pillar_verify_config
  2767. ``git_pillar_verify_config``
  2768. ----------------------------
  2769. .. versionadded:: 2017.7.0
  2770. Default: ``True``
  2771. By default, as the master starts it performs some sanity checks on the
  2772. configured git_pillar repositories. If any of these sanity checks fail (such as
  2773. when an invalid configuration is used), the master daemon will abort.
  2774. To skip these sanity checks, set this option to ``False``.
  2775. .. code-block:: yaml
  2776. git_pillar_verify_config: False
  2777. .. _pillar-merging-opts:
  2778. Pillar Merging Options
  2779. ----------------------
  2780. .. conf_master:: pillar_source_merging_strategy
  2781. ``pillar_source_merging_strategy``
  2782. **********************************
  2783. .. versionadded:: 2014.7.0
  2784. Default: ``smart``
  2785. The pillar_source_merging_strategy option allows you to configure merging
  2786. strategy between different sources. It accepts 5 values:
  2787. * ``none``:
  2788. It will not do any merging at all and only parse the pillar data from the passed environment and 'base' if no environment was specified.
  2789. .. versionadded:: 2016.3.4
  2790. * ``recurse``:
  2791. It will recursively merge data. For example, theses 2 sources:
  2792. .. code-block:: yaml
  2793. foo: 42
  2794. bar:
  2795. element1: True
  2796. .. code-block:: yaml
  2797. bar:
  2798. element2: True
  2799. baz: quux
  2800. will be merged as:
  2801. .. code-block:: yaml
  2802. foo: 42
  2803. bar:
  2804. element1: True
  2805. element2: True
  2806. baz: quux
  2807. * ``aggregate``:
  2808. instructs aggregation of elements between sources that use the #!yamlex renderer.
  2809. For example, these two documents:
  2810. .. code-block:: yaml
  2811. #!yamlex
  2812. foo: 42
  2813. bar: !aggregate {
  2814. element1: True
  2815. }
  2816. baz: !aggregate quux
  2817. .. code-block:: yaml
  2818. #!yamlex
  2819. bar: !aggregate {
  2820. element2: True
  2821. }
  2822. baz: !aggregate quux2
  2823. will be merged as:
  2824. .. code-block:: yaml
  2825. foo: 42
  2826. bar:
  2827. element1: True
  2828. element2: True
  2829. baz:
  2830. - quux
  2831. - quux2
  2832. * ``overwrite``:
  2833. Will use the behaviour of the 2014.1 branch and earlier.
  2834. Overwrites elements according the order in which they are processed.
  2835. First pillar processed:
  2836. .. code-block:: yaml
  2837. A:
  2838. first_key: blah
  2839. second_key: blah
  2840. Second pillar processed:
  2841. .. code-block:: yaml
  2842. A:
  2843. third_key: blah
  2844. fourth_key: blah
  2845. will be merged as:
  2846. .. code-block:: yaml
  2847. A:
  2848. third_key: blah
  2849. fourth_key: blah
  2850. * ``smart`` (default):
  2851. Guesses the best strategy based on the "renderer" setting.
  2852. .. note::
  2853. In order for yamlex based features such as ``!aggregate`` to work as expected
  2854. across documents using the default ``smart`` merge strategy, the :conf_master:`renderer`
  2855. config option must be set to ``jinja|yamlex`` or similar.
  2856. .. conf_master:: pillar_merge_lists
  2857. ``pillar_merge_lists``
  2858. **********************
  2859. .. versionadded:: 2015.8.0
  2860. Default: ``False``
  2861. Recursively merge lists by aggregating them instead of replacing them.
  2862. .. code-block:: yaml
  2863. pillar_merge_lists: False
  2864. .. conf_master:: pillar_includes_override_sls
  2865. ``pillar_includes_override_sls``
  2866. ********************************
  2867. .. versionadded:: 2017.7.6,2018.3.1
  2868. Default: ``False``
  2869. Prior to version 2017.7.3, keys from :ref:`pillar includes <pillar-include>`
  2870. would be merged on top of the pillar SLS. Since 2017.7.3, the includes are
  2871. merged together and then the pillar SLS is merged on top of that.
  2872. Set this option to ``True`` to return to the old behavior.
  2873. .. code-block:: yaml
  2874. pillar_includes_override_sls: True
  2875. .. _pillar-cache-opts:
  2876. Pillar Cache Options
  2877. --------------------
  2878. .. conf_master:: pillar_cache
  2879. ``pillar_cache``
  2880. ****************
  2881. .. versionadded:: 2015.8.8
  2882. Default: ``False``
  2883. A master can cache pillars locally to bypass the expense of having to render them
  2884. for each minion on every request. This feature should only be enabled in cases
  2885. where pillar rendering time is known to be unsatisfactory and any attendant security
  2886. concerns about storing pillars in a master cache have been addressed.
  2887. When enabling this feature, be certain to read through the additional ``pillar_cache_*``
  2888. configuration options to fully understand the tunable parameters and their implications.
  2889. .. code-block:: yaml
  2890. pillar_cache: False
  2891. .. note::
  2892. Setting ``pillar_cache: True`` has no effect on
  2893. :ref:`targeting minions with pillar <targeting-pillar>`.
  2894. .. conf_master:: pillar_cache_ttl
  2895. ``pillar_cache_ttl``
  2896. ********************
  2897. .. versionadded:: 2015.8.8
  2898. Default: ``3600``
  2899. If and only if a master has set ``pillar_cache: True``, the cache TTL controls the amount
  2900. of time, in seconds, before the cache is considered invalid by a master and a fresh
  2901. pillar is recompiled and stored.
  2902. .. conf_master:: pillar_cache_backend
  2903. ``pillar_cache_backend``
  2904. ************************
  2905. .. versionadded:: 2015.8.8
  2906. Default: ``disk``
  2907. If an only if a master has set ``pillar_cache: True``, one of several storage providers
  2908. can be utilized:
  2909. * ``disk`` (default):
  2910. The default storage backend. This caches rendered pillars to the master cache.
  2911. Rendered pillars are serialized and deserialized as ``msgpack`` structures for speed.
  2912. Note that pillars are stored UNENCRYPTED. Ensure that the master cache has permissions
  2913. set appropriately (sane defaults are provided).
  2914. * ``memory`` [EXPERIMENTAL]:
  2915. An optional backend for pillar caches which uses a pure-Python
  2916. in-memory data structure for maximal performance. There are several caveats,
  2917. however. First, because each master worker contains its own in-memory cache,
  2918. there is no guarantee of cache consistency between minion requests. This
  2919. works best in situations where the pillar rarely if ever changes. Secondly,
  2920. and perhaps more importantly, this means that unencrypted pillars will
  2921. be accessible to any process which can examine the memory of the ``salt-master``!
  2922. This may represent a substantial security risk.
  2923. .. code-block:: yaml
  2924. pillar_cache_backend: disk
  2925. Master Reactor Settings
  2926. =======================
  2927. .. conf_master:: reactor
  2928. ``reactor``
  2929. -----------
  2930. Default: ``[]``
  2931. Defines a salt reactor. See the :ref:`Reactor <reactor>` documentation for more
  2932. information.
  2933. .. code-block:: yaml
  2934. reactor:
  2935. - 'salt/minion/*/start':
  2936. - salt://reactor/startup_tasks.sls
  2937. .. conf_master:: reactor_refresh_interval
  2938. ``reactor_refresh_interval``
  2939. ----------------------------
  2940. Default: ``60``
  2941. The TTL for the cache of the reactor configuration.
  2942. .. code-block:: yaml
  2943. reactor_refresh_interval: 60
  2944. .. conf_master:: reactor_worker_threads
  2945. ``reactor_worker_threads``
  2946. --------------------------
  2947. Default: ``10``
  2948. The number of workers for the runner/wheel in the reactor.
  2949. .. code-block:: yaml
  2950. reactor_worker_threads: 10
  2951. .. conf_master:: reactor_worker_hwm
  2952. ``reactor_worker_hwm``
  2953. ----------------------
  2954. Default: ``10000``
  2955. The queue size for workers in the reactor.
  2956. .. code-block:: yaml
  2957. reactor_worker_hwm: 10000
  2958. .. _salt-api-master-settings:
  2959. Salt-API Master Settings
  2960. ========================
  2961. There are some settings for :ref:`salt-api <netapi-introduction>` that can be
  2962. configured on the Salt Master.
  2963. .. conf_master:: api_logfile
  2964. ``api_logfile``
  2965. ---------------
  2966. Default: ``/var/log/salt/api``
  2967. The logfile location for ``salt-api``.
  2968. .. code-block:: yaml
  2969. api_logfile: /var/log/salt/api
  2970. .. conf_master:: api_pidfile
  2971. ``api_pidfile``
  2972. ---------------
  2973. Default: /var/run/salt-api.pid
  2974. If this master will be running ``salt-api``, specify the pidfile of the
  2975. ``salt-api`` daemon.
  2976. .. code-block:: yaml
  2977. api_pidfile: /var/run/salt-api.pid
  2978. .. conf_master:: rest_timeout
  2979. ``rest_timeout``
  2980. ----------------
  2981. Default: ``300``
  2982. Used by ``salt-api`` for the master requests timeout.
  2983. .. code-block:: yaml
  2984. rest_timeout: 300
  2985. .. _syndic-server-settings:
  2986. Syndic Server Settings
  2987. ======================
  2988. A Salt syndic is a Salt master used to pass commands from a higher Salt master
  2989. to minions below the syndic. Using the syndic is simple. If this is a master
  2990. that will have syndic servers(s) below it, set the ``order_masters`` setting to
  2991. ``True``.
  2992. If this is a master that will be running a syndic daemon for passthrough the
  2993. ``syndic_master`` setting needs to be set to the location of the master server.
  2994. Do not forget that, in other words, it means that it shares with the local minion
  2995. its ID and PKI directory.
  2996. .. conf_master:: order_masters
  2997. ``order_masters``
  2998. -----------------
  2999. Default: ``False``
  3000. Extra data needs to be sent with publications if the master is controlling a
  3001. lower level master via a syndic minion. If this is the case the order_masters
  3002. value must be set to True
  3003. .. code-block:: yaml
  3004. order_masters: False
  3005. .. conf_master:: syndic_master
  3006. ``syndic_master``
  3007. -----------------
  3008. .. versionchanged:: 2016.3.5,2016.11.1
  3009. Set default higher level master address.
  3010. Default: ``masterofmasters``
  3011. If this master will be running the ``salt-syndic`` to connect to a higher level
  3012. master, specify the higher level master with this configuration value.
  3013. .. code-block:: yaml
  3014. syndic_master: masterofmasters
  3015. You can optionally connect a syndic to multiple higher level masters by
  3016. setting the ``syndic_master`` value to a list:
  3017. .. code-block:: yaml
  3018. syndic_master:
  3019. - masterofmasters1
  3020. - masterofmasters2
  3021. Each higher level master must be set up in a multi-master configuration.
  3022. .. conf_master:: syndic_master_port
  3023. ``syndic_master_port``
  3024. ----------------------
  3025. Default: ``4506``
  3026. If this master will be running the ``salt-syndic`` to connect to a higher level
  3027. master, specify the higher level master port with this configuration value.
  3028. .. code-block:: yaml
  3029. syndic_master_port: 4506
  3030. .. conf_master:: syndic_pidfile
  3031. ``syndic_pidfile``
  3032. ------------------
  3033. Default: ``/var/run/salt-syndic.pid``
  3034. If this master will be running the ``salt-syndic`` to connect to a higher level
  3035. master, specify the pidfile of the syndic daemon.
  3036. .. code-block:: yaml
  3037. syndic_pidfile: /var/run/syndic.pid
  3038. .. conf_master:: syndic_log_file
  3039. ``syndic_log_file``
  3040. -------------------
  3041. Default: ``/var/log/salt/syndic``
  3042. If this master will be running the ``salt-syndic`` to connect to a higher level
  3043. master, specify the log file of the syndic daemon.
  3044. .. code-block:: yaml
  3045. syndic_log_file: /var/log/salt-syndic.log
  3046. .. conf_master:: syndic_failover
  3047. ``syndic_failover``
  3048. -------------------
  3049. .. versionadded:: 2016.3.0
  3050. Default: ``random``
  3051. The behaviour of the multi-syndic when connection to a master of masters failed.
  3052. Can specify ``random`` (default) or ``ordered``. If set to ``random``, masters
  3053. will be iterated in random order. If ``ordered`` is specified, the configured
  3054. order will be used.
  3055. .. code-block:: yaml
  3056. syndic_failover: random
  3057. .. conf_master:: syndic_wait
  3058. ``syndic_wait``
  3059. ---------------
  3060. Default: ``5``
  3061. The number of seconds for the salt client to wait for additional syndics to
  3062. check in with their lists of expected minions before giving up.
  3063. .. code-block:: yaml
  3064. syndic_wait: 5
  3065. .. conf_master:: syndic_forward_all_events
  3066. ``syndic_forward_all_events``
  3067. -----------------------------
  3068. .. versionadded:: 2017.7.0
  3069. Default: ``False``
  3070. Option on multi-syndic or single when connected to multiple masters to be able to
  3071. send events to all connected masters.
  3072. .. code-block:: yaml
  3073. syndic_forward_all_events: False
  3074. .. _peer-publish-settings:
  3075. Peer Publish Settings
  3076. =====================
  3077. Salt minions can send commands to other minions, but only if the minion is
  3078. allowed to. By default "Peer Publication" is disabled, and when enabled it
  3079. is enabled for specific minions and specific commands. This allows secure
  3080. compartmentalization of commands based on individual minions.
  3081. .. conf_master:: peer
  3082. ``peer``
  3083. --------
  3084. Default: ``{}``
  3085. The configuration uses regular expressions to match minions and then a list
  3086. of regular expressions to match functions. The following will allow the
  3087. minion authenticated as foo.example.com to execute functions from the test
  3088. and pkg modules.
  3089. .. code-block:: yaml
  3090. peer:
  3091. foo.example.com:
  3092. - test.*
  3093. - pkg.*
  3094. This will allow all minions to execute all commands:
  3095. .. code-block:: yaml
  3096. peer:
  3097. .*:
  3098. - .*
  3099. This is not recommended, since it would allow anyone who gets root on any
  3100. single minion to instantly have root on all of the minions!
  3101. By adding an additional layer you can limit the target hosts in addition to the
  3102. accessible commands:
  3103. .. code-block:: yaml
  3104. peer:
  3105. foo.example.com:
  3106. 'db*':
  3107. - test.*
  3108. - pkg.*
  3109. .. conf_master:: peer_run
  3110. ``peer_run``
  3111. ------------
  3112. Default: ``{}``
  3113. The peer_run option is used to open up runners on the master to access from the
  3114. minions. The peer_run configuration matches the format of the peer
  3115. configuration.
  3116. The following example would allow foo.example.com to execute the manage.up
  3117. runner:
  3118. .. code-block:: yaml
  3119. peer_run:
  3120. foo.example.com:
  3121. - manage.up
  3122. .. _master-logging-settings:
  3123. Master Logging Settings
  3124. =======================
  3125. .. conf_master:: log_file
  3126. ``log_file``
  3127. ------------
  3128. Default: ``/var/log/salt/master``
  3129. The master log can be sent to a regular file, local path name, or network
  3130. location. See also :conf_log:`log_file`.
  3131. Examples:
  3132. .. code-block:: yaml
  3133. log_file: /var/log/salt/master
  3134. .. code-block:: yaml
  3135. log_file: file:///dev/log
  3136. .. code-block:: yaml
  3137. log_file: udp://loghost:10514
  3138. .. conf_master:: log_level
  3139. ``log_level``
  3140. -------------
  3141. Default: ``warning``
  3142. The level of messages to send to the console. See also :conf_log:`log_level`.
  3143. .. code-block:: yaml
  3144. log_level: warning
  3145. .. conf_master:: log_level_logfile
  3146. ``log_level_logfile``
  3147. ---------------------
  3148. Default: ``warning``
  3149. The level of messages to send to the log file. See also
  3150. :conf_log:`log_level_logfile`. When it is not set explicitly
  3151. it will inherit the level set by :conf_log:`log_level` option.
  3152. .. code-block:: yaml
  3153. log_level_logfile: warning
  3154. .. conf_master:: log_datefmt
  3155. ``log_datefmt``
  3156. ---------------
  3157. Default: ``%H:%M:%S``
  3158. The date and time format used in console log messages. See also
  3159. :conf_log:`log_datefmt`.
  3160. .. code-block:: yaml
  3161. log_datefmt: '%H:%M:%S'
  3162. .. conf_master:: log_datefmt_logfile
  3163. ``log_datefmt_logfile``
  3164. -----------------------
  3165. Default: ``%Y-%m-%d %H:%M:%S``
  3166. The date and time format used in log file messages. See also
  3167. :conf_log:`log_datefmt_logfile`.
  3168. .. code-block:: yaml
  3169. log_datefmt_logfile: '%Y-%m-%d %H:%M:%S'
  3170. .. conf_master:: log_fmt_console
  3171. ``log_fmt_console``
  3172. -------------------
  3173. Default: ``[%(levelname)-8s] %(message)s``
  3174. The format of the console logging messages. See also
  3175. :conf_log:`log_fmt_console`.
  3176. .. note::
  3177. Log colors are enabled in ``log_fmt_console`` rather than the
  3178. :conf_master:`color` config since the logging system is loaded before the
  3179. master config.
  3180. Console log colors are specified by these additional formatters:
  3181. %(colorlevel)s
  3182. %(colorname)s
  3183. %(colorprocess)s
  3184. %(colormsg)s
  3185. Since it is desirable to include the surrounding brackets, '[' and ']', in
  3186. the coloring of the messages, these color formatters also include padding
  3187. as well. Color LogRecord attributes are only available for console
  3188. logging.
  3189. .. code-block:: yaml
  3190. log_fmt_console: '%(colorlevel)s %(colormsg)s'
  3191. log_fmt_console: '[%(levelname)-8s] %(message)s'
  3192. .. conf_master:: log_fmt_logfile
  3193. ``log_fmt_logfile``
  3194. -------------------
  3195. Default: ``%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s``
  3196. The format of the log file logging messages. See also
  3197. :conf_log:`log_fmt_logfile`.
  3198. .. code-block:: yaml
  3199. log_fmt_logfile: '%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s'
  3200. .. conf_master:: log_granular_levels
  3201. ``log_granular_levels``
  3202. -----------------------
  3203. Default: ``{}``
  3204. This can be used to control logging levels more specifically. See also
  3205. :conf_log:`log_granular_levels`.
  3206. .. conf_master:: log_rotate_max_bytes
  3207. ``log_rotate_max_bytes``
  3208. ------------------------
  3209. Default: ``0``
  3210. The maximum number of bytes a single log file may contain before it is rotated.
  3211. A value of 0 disables this feature. Currently only supported on Windows. On
  3212. other platforms, use an external tool such as 'logrotate' to manage log files.
  3213. :conf_log:`log_rotate_max_bytes`
  3214. .. conf_master:: log_rotate_backup_count
  3215. ``log_rotate_backup_count``
  3216. ---------------------------
  3217. Default: ``0``
  3218. The number of backup files to keep when rotating log files. Only used if
  3219. :conf_master:`log_rotate_max_bytes` is greater than 0. Currently only supported
  3220. on Windows. On other platforms, use an external tool such as 'logrotate' to
  3221. manage log files.
  3222. :conf_log:`log_rotate_backup_count`
  3223. .. _node-groups:
  3224. Node Groups
  3225. ===========
  3226. .. conf_master:: nodegroups
  3227. ``nodegroups``
  3228. --------------
  3229. Default: ``{}``
  3230. Node groups allow for logical groupings of minion nodes.
  3231. A group consists of a group name and a compound target.
  3232. .. code-block:: yaml
  3233. nodegroups:
  3234. group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com or bl*.domain.com'
  3235. group2: 'G@os:Debian and foo.domain.com'
  3236. group3: 'G@os:Debian and N@group1'
  3237. group4:
  3238. - 'G@foo:bar'
  3239. - 'or'
  3240. - 'G@foo:baz'
  3241. More information on using nodegroups can be found :ref:`here <targeting-nodegroups>`.
  3242. .. _range-cluster-settings:
  3243. Range Cluster Settings
  3244. ======================
  3245. .. conf_master:: range_server
  3246. ``range_server``
  3247. ----------------
  3248. Default: ``'range:80'``
  3249. The range server (and optional port) that serves your cluster information
  3250. https://github.com/ytoolshed/range/wiki/%22yamlfile%22-module-file-spec
  3251. .. code-block:: yaml
  3252. range_server: range:80
  3253. .. _include-configuration:
  3254. Include Configuration
  3255. =====================
  3256. Configuration can be loaded from multiple files. The order in which this is
  3257. done is:
  3258. 1. The master config file itself
  3259. 2. The files matching the glob in :conf_master:`default_include`
  3260. 3. The files matching the glob in :conf_master:`include` (if defined)
  3261. Each successive step overrides any values defined in the previous steps.
  3262. Therefore, any config options defined in one of the
  3263. :conf_master:`default_include` files would override the same value in the
  3264. master config file, and any options defined in :conf_master:`include` would
  3265. override both.
  3266. .. conf_master:: default_include
  3267. ``default_include``
  3268. -------------------
  3269. Default: ``master.d/*.conf``
  3270. The master can include configuration from other files. Per default the
  3271. master will automatically include all config files from ``master.d/*.conf``
  3272. where ``master.d`` is relative to the directory of the master configuration
  3273. file.
  3274. .. note::
  3275. Salt creates files in the ``master.d`` directory for its own use. These
  3276. files are prefixed with an underscore. A common example of this is the
  3277. ``_schedule.conf`` file.
  3278. .. conf_master:: include
  3279. ``include``
  3280. -----------
  3281. Default: ``not defined``
  3282. The master can include configuration from other files. To enable this,
  3283. pass a list of paths to this option. The paths can be either relative or
  3284. absolute; if relative, they are considered to be relative to the directory
  3285. the main minion configuration file lives in. Paths can make use of
  3286. shell-style globbing. If no files are matched by a path passed to this
  3287. option then the master will log a warning message.
  3288. .. code-block:: yaml
  3289. # Include files from a master.d directory in the same
  3290. # directory as the master config file
  3291. include: master.d/*
  3292. # Include a single extra file into the configuration
  3293. include: /etc/roles/webserver
  3294. # Include several files and the master.d directory
  3295. include:
  3296. - extra_config
  3297. - master.d/*
  3298. - /etc/roles/webserver
  3299. Keepalive Settings
  3300. ==================
  3301. .. conf_master:: tcp_keepalive
  3302. ``tcp_keepalive``
  3303. -----------------
  3304. Default: ``True``
  3305. The tcp keepalive interval to set on TCP ports. This setting can be used to tune Salt
  3306. connectivity issues in messy network environments with misbehaving firewalls.
  3307. .. code-block:: yaml
  3308. tcp_keepalive: True
  3309. .. conf_master:: tcp_keepalive_cnt
  3310. ``tcp_keepalive_cnt``
  3311. ---------------------
  3312. Default: ``-1``
  3313. Sets the ZeroMQ TCP keepalive count. May be used to tune issues with minion disconnects.
  3314. .. code-block:: yaml
  3315. tcp_keepalive_cnt: -1
  3316. .. conf_master:: tcp_keepalive_idle
  3317. ``tcp_keepalive_idle``
  3318. ----------------------
  3319. Default: ``300``
  3320. Sets ZeroMQ TCP keepalive idle. May be used to tune issues with minion disconnects.
  3321. .. code-block:: yaml
  3322. tcp_keepalive_idle: 300
  3323. .. conf_master:: tcp_keepalive_intvl
  3324. ``tcp_keepalive_intvl``
  3325. -----------------------
  3326. Default: ``-1``
  3327. Sets ZeroMQ TCP keepalive interval. May be used to tune issues with minion disconnects.
  3328. .. code-block:: yaml
  3329. tcp_keepalive_intvl': -1
  3330. .. _winrepo-master-config-opts:
  3331. Windows Software Repo Settings
  3332. ==============================
  3333. .. conf_master:: winrepo_provider
  3334. ``winrepo_provider``
  3335. --------------------
  3336. .. versionadded:: 2015.8.0
  3337. Specify the provider to be used for winrepo. Must be either ``pygit2`` or
  3338. ``gitpython``. If unset, then both will be tried in that same order, and the
  3339. first one with a compatible version installed will be the provider that is
  3340. used.
  3341. .. code-block:: yaml
  3342. winrepo_provider: gitpython
  3343. .. conf_master:: winrepo_dir
  3344. .. conf_master:: win_repo
  3345. ``winrepo_dir``
  3346. ---------------
  3347. .. versionchanged:: 2015.8.0
  3348. Renamed from ``win_repo`` to ``winrepo_dir``.
  3349. Default: ``/srv/salt/win/repo``
  3350. Location on the master where the :conf_master:`winrepo_remotes` are checked out
  3351. for pre-2015.8.0 minions. 2015.8.0 and later minions use
  3352. :conf_master:`winrepo_remotes_ng <winrepo_remotes_ng>` instead.
  3353. .. code-block:: yaml
  3354. winrepo_dir: /srv/salt/win/repo
  3355. .. conf_master:: winrepo_dir_ng
  3356. ``winrepo_dir_ng``
  3357. ------------------
  3358. .. versionadded:: 2015.8.0
  3359. A new :ref:`ng <windows-package-manager>` repo was added.
  3360. Default: ``/srv/salt/win/repo-ng``
  3361. Location on the master where the :conf_master:`winrepo_remotes_ng` are checked
  3362. out for 2015.8.0 and later minions.
  3363. .. code-block:: yaml
  3364. winrepo_dir_ng: /srv/salt/win/repo-ng
  3365. .. conf_master:: winrepo_cachefile
  3366. .. conf_master:: win_repo_mastercachefile
  3367. ``winrepo_cachefile``
  3368. ---------------------
  3369. .. versionchanged:: 2015.8.0
  3370. Renamed from ``win_repo_mastercachefile`` to ``winrepo_cachefile``
  3371. .. note::
  3372. 2015.8.0 and later minions do not use this setting since the cachefile
  3373. is now located on the minion.
  3374. Default: ``winrepo.p``
  3375. Path relative to :conf_master:`winrepo_dir` where the winrepo cache should be
  3376. created.
  3377. .. code-block:: yaml
  3378. winrepo_cachefile: winrepo.p
  3379. .. conf_master:: winrepo_remotes
  3380. .. conf_master:: win_gitrepos
  3381. ``winrepo_remotes``
  3382. -------------------
  3383. .. versionchanged:: 2015.8.0
  3384. Renamed from ``win_gitrepos`` to ``winrepo_remotes``.
  3385. Default: ``['https://github.com/saltstack/salt-winrepo.git']``
  3386. List of git repositories to checkout and include in the winrepo for
  3387. pre-2015.8.0 minions. 2015.8.0 and later minions use
  3388. :conf_master:`winrepo_remotes_ng <winrepo_remotes_ng>` instead.
  3389. .. code-block:: yaml
  3390. winrepo_remotes:
  3391. - https://github.com/saltstack/salt-winrepo.git
  3392. To specify a specific revision of the repository, prepend a commit ID to the
  3393. URL of the repository:
  3394. .. code-block:: yaml
  3395. winrepo_remotes:
  3396. - '<commit_id> https://github.com/saltstack/salt-winrepo.git'
  3397. Replace ``<commit_id>`` with the SHA1 hash of a commit ID. Specifying a commit
  3398. ID is useful in that it allows one to revert back to a previous version in the
  3399. event that an error is introduced in the latest revision of the repo.
  3400. .. conf_master:: winrepo_remotes_ng
  3401. ``winrepo_remotes_ng``
  3402. ----------------------
  3403. .. versionadded:: 2015.8.0
  3404. A new :ref:`ng <windows-package-manager>` repo was added.
  3405. Default: ``['https://github.com/saltstack/salt-winrepo-ng.git']``
  3406. List of git repositories to checkout and include in the winrepo for
  3407. 2015.8.0 and later minions.
  3408. .. code-block:: yaml
  3409. winrepo_remotes_ng:
  3410. - https://github.com/saltstack/salt-winrepo-ng.git
  3411. To specify a specific revision of the repository, prepend a commit ID to the
  3412. URL of the repository:
  3413. .. code-block:: yaml
  3414. winrepo_remotes_ng:
  3415. - '<commit_id> https://github.com/saltstack/salt-winrepo-ng.git'
  3416. Replace ``<commit_id>`` with the SHA1 hash of a commit ID. Specifying a commit
  3417. ID is useful in that it allows one to revert back to a previous version in the
  3418. event that an error is introduced in the latest revision of the repo.
  3419. .. conf_master:: winrepo_branch
  3420. ``winrepo_branch``
  3421. ------------------
  3422. .. versionadded:: 2015.8.0
  3423. Default: ``master``
  3424. If the branch is omitted from a winrepo remote, then this branch will be
  3425. used instead. For example, in the configuration below, the first two remotes
  3426. would use the ``winrepo`` branch/tag, while the third would use the ``foo``
  3427. branch/tag.
  3428. .. code-block:: yaml
  3429. winrepo_branch: winrepo
  3430. winrepo_remotes:
  3431. - https://mygitserver/winrepo1.git
  3432. - https://mygitserver/winrepo2.git:
  3433. - foo https://mygitserver/winrepo3.git
  3434. .. conf_master:: winrepo_ssl_verify
  3435. ``winrepo_ssl_verify``
  3436. ----------------------
  3437. .. versionadded:: 2015.8.0
  3438. .. versionchanged:: 2016.11.0
  3439. Default: ``False``
  3440. Specifies whether or not to ignore SSL certificate errors when contacting the
  3441. remote repository. The ``False`` setting is useful if you're using a
  3442. git repo that uses a self-signed certificate. However, keep in mind that
  3443. setting this to anything other ``True`` is a considered insecure, and using an
  3444. SSH-based transport (if available) may be a better option.
  3445. In the 2016.11.0 release, the default config value changed from ``False`` to
  3446. ``True``.
  3447. .. code-block:: yaml
  3448. winrepo_ssl_verify: True
  3449. Winrepo Authentication Options
  3450. ------------------------------
  3451. These parameters only currently apply to the ``pygit2``
  3452. :conf_master:`winrepo_provider`. Authentication works the same as it does in
  3453. gitfs, as outlined in the :ref:`GitFS Walkthrough <gitfs-authentication>`,
  3454. though the global configuration options are named differently to reflect that
  3455. they are for winrepo instead of gitfs.
  3456. .. conf_master:: winrepo_user
  3457. ``winrepo_user``
  3458. ****************
  3459. .. versionadded:: 2015.8.0
  3460. Default: ``''``
  3461. Along with :conf_master:`winrepo_password`, is used to authenticate to HTTPS
  3462. remotes.
  3463. .. code-block:: yaml
  3464. winrepo_user: git
  3465. .. conf_master:: winrepo_password
  3466. ``winrepo_password``
  3467. ********************
  3468. .. versionadded:: 2015.8.0
  3469. Default: ``''``
  3470. Along with :conf_master:`winrepo_user`, is used to authenticate to HTTPS
  3471. remotes. This parameter is not required if the repository does not use
  3472. authentication.
  3473. .. code-block:: yaml
  3474. winrepo_password: mypassword
  3475. .. conf_master:: winrepo_insecure_auth
  3476. ``winrepo_insecure_auth``
  3477. *************************
  3478. .. versionadded:: 2015.8.0
  3479. Default: ``False``
  3480. By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
  3481. parameter enables authentication over HTTP. **Enable this at your own risk.**
  3482. .. code-block:: yaml
  3483. winrepo_insecure_auth: True
  3484. .. conf_master:: winrepo_pubkey
  3485. ``winrepo_pubkey``
  3486. ******************
  3487. .. versionadded:: 2015.8.0
  3488. Default: ``''``
  3489. Along with :conf_master:`winrepo_privkey` (and optionally
  3490. :conf_master:`winrepo_passphrase`), is used to authenticate to SSH remotes.
  3491. .. code-block:: yaml
  3492. winrepo_pubkey: /path/to/key.pub
  3493. .. conf_master:: winrepo_privkey
  3494. ``winrepo_privkey``
  3495. *******************
  3496. .. versionadded:: 2015.8.0
  3497. Default: ``''``
  3498. Along with :conf_master:`winrepo_pubkey` (and optionally
  3499. :conf_master:`winrepo_passphrase`), is used to authenticate to SSH remotes.
  3500. .. code-block:: yaml
  3501. winrepo_privkey: /path/to/key
  3502. .. conf_master:: winrepo_passphrase
  3503. ``winrepo_passphrase``
  3504. **********************
  3505. .. versionadded:: 2015.8.0
  3506. Default: ``''``
  3507. This parameter is optional, required only when the SSH key being used to
  3508. authenticate is protected by a passphrase.
  3509. .. code-block:: yaml
  3510. winrepo_passphrase: mypassphrase
  3511. .. conf_master:: winrepo_refspecs
  3512. ``winrepo_refspecs``
  3513. ~~~~~~~~~~~~~~~~~~~~
  3514. .. versionadded:: 2017.7.0
  3515. Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']``
  3516. When fetching from remote repositories, by default Salt will fetch branches and
  3517. tags. This parameter can be used to override the default and specify
  3518. alternate refspecs to be fetched. This parameter works similarly to its
  3519. :ref:`GitFS counterpart <gitfs-custom-refspecs>`, in that it can be
  3520. configured both globally and for individual remotes.
  3521. .. code-block:: yaml
  3522. winrepo_refspecs:
  3523. - '+refs/heads/*:refs/remotes/origin/*'
  3524. - '+refs/tags/*:refs/tags/*'
  3525. - '+refs/pull/*/head:refs/remotes/origin/pr/*'
  3526. - '+refs/pull/*/merge:refs/remotes/origin/merge/*'
  3527. .. _configure-master-on-windows:
  3528. Configure Master on Windows
  3529. ===========================
  3530. The master on Windows requires no additional configuration. You can modify the
  3531. master configuration by creating/editing the master config file located at
  3532. ``c:\salt\conf\master``. The same configuration options available on Linux are
  3533. available in Windows, as long as they apply. For example, SSH options wouldn't
  3534. apply in Windows. The main differences are the file paths. If you are familiar
  3535. with common salt paths, the following table may be useful:
  3536. ============= ========= =================
  3537. linux Paths Windows Paths
  3538. ============= ========= =================
  3539. ``/etc/salt`` ``<--->`` ``c:\salt\conf``
  3540. ``/`` ``<--->`` ``c:\salt``
  3541. ============= ========= =================
  3542. So, for example, the master config file in Linux is ``/etc/salt/master``. In
  3543. Windows the master config file is ``c:\salt\conf\master``. The Linux path
  3544. ``/etc/salt`` becomes ``c:\salt\conf`` in Windows.
  3545. Common File Locations
  3546. ---------------------
  3547. ====================================== =============================================
  3548. Linux Paths Windows Paths
  3549. ====================================== =============================================
  3550. ``conf_file: /etc/salt/master`` ``conf_file: c:\salt\conf\master``
  3551. ``log_file: /var/log/salt/master`` ``log_file: c:\salt\var\log\salt\master``
  3552. ``pidfile: /var/run/salt-master.pid`` ``pidfile: c:\salt\var\run\salt-master.pid``
  3553. ====================================== =============================================
  3554. Common Directories
  3555. ------------------
  3556. ====================================================== ============================================
  3557. Linux Paths Windows Paths
  3558. ====================================================== ============================================
  3559. ``cachedir: /var/cache/salt/master`` ``cachedir: c:\salt\var\cache\salt\master``
  3560. ``extension_modules: /var/cache/salt/master/extmods`` ``c:\salt\var\cache\salt\master\extmods``
  3561. ``pki_dir: /etc/salt/pki/master`` ``pki_dir: c:\salt\conf\pki\master``
  3562. ``root_dir: /`` ``root_dir: c:\salt``
  3563. ``sock_dir: /var/run/salt/master`` ``sock_dir: c:\salt\var\run\salt\master``
  3564. ====================================================== ============================================
  3565. Roots
  3566. -----
  3567. **file_roots**
  3568. ================== =========================
  3569. Linux Paths Windows Paths
  3570. ================== =========================
  3571. ``/srv/salt`` ``c:\salt\srv\salt``
  3572. ``/srv/spm/salt`` ``c:\salt\srv\spm\salt``
  3573. ================== =========================
  3574. **pillar_roots**
  3575. ==================== ===========================
  3576. Linux Paths Windows Paths
  3577. ==================== ===========================
  3578. ``/srv/pillar`` ``c:\salt\srv\pillar``
  3579. ``/srv/spm/pillar`` ``c:\salt\srv\spm\pillar``
  3580. ==================== ===========================
  3581. Win Repo Settings
  3582. -----------------
  3583. ========================================== =================================================
  3584. Linux Paths Windows Paths
  3585. ========================================== =================================================
  3586. ``winrepo_dir: /srv/salt/win/repo`` ``winrepo_dir: c:\salt\srv\salt\win\repo``
  3587. ``winrepo_dir_ng: /srv/salt/win/repo-ng`` ``winrepo_dir_ng: c:\salt\srv\salt\win\repo-ng``
  3588. ========================================== =================================================