master.rst 141 KB

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