1
0

master.rst 139 KB

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