master.rst 139 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769
  1. .. _configuration-salt-master:
  2. ===========================
  3. Configuring the Salt Master
  4. ===========================
  5. The Salt system is amazingly simple and easy to configure, the two components
  6. of the Salt system each have a respective configuration file. The
  7. ``salt-master`` is configured via the master configuration file, and the
  8. ``salt-minion`` is configured via the minion configuration file.
  9. .. seealso::
  10. :ref:`Example master configuration file <configuration-examples-master>`.
  11. The configuration file for the salt-master is located at ``/etc/salt/master``
  12. by default. Atomic included configuration files can be placed in
  13. ``/etc/salt/master.d/*.conf``. Warning: files with other suffixes than .conf will
  14. not be included. A notable exception is FreeBSD, where the configuration file is
  15. located at ``/usr/local/etc/salt``. The available options are as follows:
  16. .. _primary-master-configuration:
  17. Primary Master Configuration
  18. ============================
  19. .. conf_master:: interface
  20. ``interface``
  21. -------------
  22. Default: ``0.0.0.0`` (all interfaces)
  23. The local interface to bind to, must be an IP address.
  24. .. code-block:: yaml
  25. interface: 192.168.0.1
  26. .. conf_master:: ipv6
  27. ``ipv6``
  28. --------
  29. Default: ``False``
  30. Whether the master should listen for IPv6 connections. If this is set to True,
  31. the interface option must be adjusted too (for example: ``interface: '::'``)
  32. .. code-block:: yaml
  33. ipv6: True
  34. .. conf_master:: publish_port
  35. ``publish_port``
  36. ----------------
  37. Default: ``4505``
  38. The network port to set up the publication interface.
  39. .. code-block:: yaml
  40. publish_port: 4505
  41. .. conf_master:: master_id
  42. ``master_id``
  43. -------------
  44. Default: ``None``
  45. The id to be passed in the publish job to minions. This is used for MultiSyndics
  46. to return the job to the requesting master.
  47. .. note::
  48. This must be the same string as the syndic is configured with.
  49. .. code-block:: yaml
  50. master_id: MasterOfMaster
  51. .. conf_master:: user
  52. ``user``
  53. --------
  54. Default: ``root``
  55. The user to run the Salt processes
  56. .. code-block:: yaml
  57. user: root
  58. .. conf_master:: ret_port
  59. ``enable_ssh_minions``
  60. ----------------------
  61. Default: ``False``
  62. Tell the master to also use salt-ssh when running commands against minions.
  63. .. code-block:: yaml
  64. enable_ssh_minions: True
  65. .. note::
  66. Cross-minion communication is still not possible. The Salt mine and
  67. publish.publish do not work between minion types.
  68. ``ret_port``
  69. ------------
  70. Default: ``4506``
  71. The port used by the return server, this is the server used by Salt to receive
  72. execution returns and command executions.
  73. .. code-block:: yaml
  74. ret_port: 4506
  75. .. conf_master:: pidfile
  76. ``pidfile``
  77. -----------
  78. Default: ``/var/run/salt-master.pid``
  79. Specify the location of the master pidfile.
  80. .. code-block:: yaml
  81. pidfile: /var/run/salt-master.pid
  82. .. conf_master:: root_dir
  83. ``root_dir``
  84. ------------
  85. Default: ``/``
  86. The system root directory to operate from, change this to make Salt run from
  87. an alternative root.
  88. .. code-block:: yaml
  89. root_dir: /
  90. .. note::
  91. This directory is prepended to the following options:
  92. :conf_master:`pki_dir`, :conf_master:`cachedir`, :conf_master:`sock_dir`,
  93. :conf_master:`log_file`, :conf_master:`autosign_file`,
  94. :conf_master:`autoreject_file`, :conf_master:`pidfile`,
  95. :conf_master:`autosign_grains_dir`.
  96. .. conf_master:: conf_file
  97. ``conf_file``
  98. -------------
  99. Default: ``/etc/salt/master``
  100. The path to the master's configuration file.
  101. .. code-block:: yaml
  102. conf_file: /etc/salt/master
  103. .. conf_master:: pki_dir
  104. ``pki_dir``
  105. -----------
  106. Default: ``/etc/salt/pki/master``
  107. The directory to store the pki authentication keys.
  108. .. code-block:: yaml
  109. pki_dir: /etc/salt/pki/master
  110. .. conf_master:: extension_modules
  111. ``extension_modules``
  112. ---------------------
  113. .. versionchanged:: 2016.3.0
  114. The default location for this directory has been moved. Prior to this
  115. version, the location was a directory named ``extmods`` in the Salt
  116. cachedir (on most platforms, ``/var/cache/salt/extmods``). It has been
  117. moved into the master cachedir (on most platforms,
  118. ``/var/cache/salt/master/extmods``).
  119. Directory for custom modules. This directory can contain subdirectories for
  120. each of Salt's module types such as ``runners``, ``output``, ``wheel``,
  121. ``modules``, ``states``, ``returners``, ``engines``, ``utils``, etc.
  122. This path is appended to :conf_master:`root_dir`.
  123. .. code-block:: yaml
  124. extension_modules: /root/salt_extmods
  125. .. conf_master:: extmod_whitelist
  126. .. conf_master:: extmod_blacklist
  127. ``extmod_whitelist/extmod_blacklist``
  128. -------------------------------------
  129. .. versionadded:: 2017.7.0
  130. By using this dictionary, the modules that are synced to the master's extmod cache using `saltutil.sync_*` can be
  131. limited. If nothing is set to a specific type, then all modules are accepted. To block all modules of a specific type,
  132. whitelist an empty list.
  133. .. code-block:: yaml
  134. extmod_whitelist:
  135. modules:
  136. - custom_module
  137. engines:
  138. - custom_engine
  139. pillars: []
  140. extmod_blacklist:
  141. modules:
  142. - specific_module
  143. Valid options:
  144. - modules
  145. - states
  146. - grains
  147. - renderers
  148. - returners
  149. - output
  150. - proxy
  151. - runners
  152. - wheel
  153. - engines
  154. - queues
  155. - pillar
  156. - utils
  157. - sdb
  158. - cache
  159. - clouds
  160. - tops
  161. - roster
  162. - tokens
  163. .. conf_master:: module_dirs
  164. ``module_dirs``
  165. ---------------
  166. Default: ``[]``
  167. Like ``extension_modules``, but a list of extra directories to search
  168. for Salt modules.
  169. .. code-block:: yaml
  170. module_dirs:
  171. - /var/cache/salt/minion/extmods
  172. .. conf_master:: cachedir
  173. ``cachedir``
  174. ------------
  175. Default: ``/var/cache/salt/master``
  176. The location used to store cache information, particularly the job information
  177. for executed salt commands.
  178. This directory may contain sensitive data and should be protected accordingly.
  179. .. code-block:: yaml
  180. cachedir: /var/cache/salt/master
  181. .. conf_master:: verify_env
  182. ``verify_env``
  183. --------------
  184. Default: ``True``
  185. Verify and set permissions on configuration directories at startup.
  186. .. code-block:: yaml
  187. verify_env: True
  188. .. conf_master:: keep_jobs
  189. ``keep_jobs``
  190. -------------
  191. Default: ``24``
  192. Set the number of hours to keep old job information. Note that setting this option
  193. to ``0`` disables the cache cleaner.
  194. .. code-block:: yaml
  195. keep_jobs: 24
  196. .. conf_master:: gather_job_timeout
  197. ``gather_job_timeout``
  198. ----------------------
  199. .. versionadded:: 2014.7.0
  200. Default: ``10``
  201. The number of seconds to wait when the client is requesting information
  202. about running jobs.
  203. .. code-block:: yaml
  204. gather_job_timeout: 10
  205. .. conf_master:: timeout
  206. ``timeout``
  207. -----------
  208. Default: ``5``
  209. Set the default timeout for the salt command and api.
  210. .. conf_master:: loop_interval
  211. ``loop_interval``
  212. -----------------
  213. Default: ``60``
  214. The loop_interval option controls the seconds for the master's maintenance
  215. process check cycle. This process updates file server backends, cleans the
  216. job cache and executes the scheduler.
  217. .. conf_master:: output
  218. ``output``
  219. ----------
  220. Default: ``nested``
  221. Set the default outputter used by the salt command.
  222. .. conf_master:: outputter_dirs
  223. ``outputter_dirs``
  224. ------------------
  225. Default: ``[]``
  226. A list of additional directories to search for salt outputters in.
  227. .. code-block:: yaml
  228. outputter_dirs: []
  229. .. conf_master:: output_file
  230. ``output_file``
  231. ---------------
  232. Default: None
  233. Set the default output file used by the salt command. Default is to output
  234. to the CLI and not to a file. Functions the same way as the "--out-file"
  235. CLI option, only sets this to a single file for all salt commands.
  236. .. code-block:: yaml
  237. output_file: /path/output/file
  238. .. conf_master:: show_timeout
  239. ``show_timeout``
  240. ----------------
  241. Default: ``True``
  242. Tell the client to show minions that have timed out.
  243. .. code-block:: yaml
  244. show_timeout: True
  245. .. conf_master:: show_jid
  246. ``show_jid``
  247. ------------
  248. Default: ``False``
  249. Tell the client to display the jid when a job is published.
  250. .. code-block:: yaml
  251. show_jid: False
  252. .. conf_master:: color
  253. ``color``
  254. ---------
  255. Default: ``True``
  256. By default output is colored, to disable colored output set the color value
  257. to False.
  258. .. code-block:: yaml
  259. color: False
  260. .. conf_master:: color_theme
  261. ``color_theme``
  262. ---------------
  263. Default: ``""``
  264. Specifies a path to the color theme to use for colored command line output.
  265. .. code-block:: yaml
  266. color_theme: /etc/salt/color_theme
  267. .. conf_master:: cli_summary
  268. ``cli_summary``
  269. ---------------
  270. Default: ``False``
  271. When set to ``True``, displays a summary of the number of minions targeted,
  272. the number of minions returned, and the number of minions that did not
  273. return.
  274. .. code-block:: yaml
  275. cli_summary: False
  276. .. conf_master:: sock_dir
  277. ``sock_dir``
  278. ------------
  279. Default: :file:`/var/run/salt/master`
  280. Set the location to use for creating Unix sockets for master process
  281. communication.
  282. .. code-block:: yaml
  283. sock_dir: /var/run/salt/master
  284. .. conf_master:: enable_gpu_grains
  285. ``enable_gpu_grains``
  286. ---------------------
  287. Default: ``False``
  288. Enable GPU hardware data for your master. Be aware that the master can
  289. take a while to start up when lspci and/or dmidecode is used to populate the
  290. grains for the master.
  291. .. code-block:: yaml
  292. enable_gpu_grains: True
  293. .. conf_master:: skip_grains
  294. ``skip_grains``
  295. ---------------------
  296. Default: ``False``
  297. MasterMinions should omit grains. A MasterMinion is "a minion function object
  298. for generic use on the master" that omit pillar. A RunnerClient creates a
  299. MasterMinion omitting states and renderer. Setting to True can improve master
  300. performance.
  301. .. code-block:: yaml
  302. skip_grains: True
  303. .. conf_master:: job_cache
  304. ``job_cache``
  305. -------------
  306. Default: ``True``
  307. The master maintains a temporary job cache. While this is a great addition, it
  308. can be a burden on the master for larger deployments (over 5000 minions).
  309. Disabling the job cache will make previously executed jobs unavailable to
  310. the jobs system and is not generally recommended. Normally it is wise to make
  311. sure the master has access to a faster IO system or a tmpfs is mounted to the
  312. jobs dir.
  313. .. code-block:: yaml
  314. job_cache: True
  315. .. note::
  316. Setting the ``job_cache`` to ``False`` will not cache minion returns, but
  317. the JID directory for each job is still created. The creation of the JID
  318. directories is necessary because Salt uses those directories to check for
  319. JID collisions. By setting this option to ``False``, the job cache
  320. directory, which is ``/var/cache/salt/master/jobs/`` by default, will be
  321. smaller, but the JID directories will still be present.
  322. Note that the :conf_master:`keep_jobs` option can be set to a lower value,
  323. such as ``1``, to limit the number of hours jobs are stored in the job
  324. cache. (The default is 24 hours.)
  325. Please see the :ref:`Managing the Job Cache <managing_the_job_cache>`
  326. documentation for more information.
  327. .. conf_master:: minion_data_cache
  328. ``minion_data_cache``
  329. ---------------------
  330. Default: ``True``
  331. The minion data cache is a cache of information about the minions stored on the
  332. master, this information is primarily the pillar, grains and mine data. The data
  333. is cached via the cache subsystem in the Master cachedir under the name of the
  334. minion or in a supported database. The data is used to predetermine what minions
  335. are expected to reply from executions.
  336. .. code-block:: yaml
  337. minion_data_cache: True
  338. .. conf_master:: cache
  339. ``cache``
  340. ---------
  341. Default: ``localfs``
  342. Cache subsystem module to use for minion data cache.
  343. .. code-block:: yaml
  344. cache: consul
  345. .. conf_master:: memcache_expire_seconds
  346. ``memcache_expire_seconds``
  347. ---------------------------
  348. Default: ``0``
  349. Memcache is an additional cache layer that keeps a limited amount of data
  350. fetched from the minion data cache for a limited period of time in memory that
  351. makes cache operations faster. It doesn't make much sense for the ``localfs``
  352. cache driver but helps for more complex drivers like ``consul``.
  353. This option sets the memcache items expiration time. By default is set to ``0``
  354. that disables the memcache.
  355. .. code-block:: yaml
  356. memcache_expire_seconds: 30
  357. .. conf_master:: memcache_max_items
  358. ``memcache_max_items``
  359. ----------------------
  360. Default: ``1024``
  361. Set memcache limit in items that are bank-key pairs. I.e the list of
  362. minion_0/data, minion_0/mine, minion_1/data contains 3 items. This value depends
  363. on the count of minions usually targeted in your environment. The best one could
  364. be found by analyzing the cache log with ``memcache_debug`` enabled.
  365. .. code-block:: yaml
  366. memcache_max_items: 1024
  367. .. conf_master:: memcache_full_cleanup
  368. ``memcache_full_cleanup``
  369. -------------------------
  370. Default: ``False``
  371. If cache storage got full, i.e. the items count exceeds the
  372. ``memcache_max_items`` value, memcache cleans up its storage. If this option
  373. set to ``False`` memcache removes the only one oldest value from its storage.
  374. If this set set to ``True`` memcache removes all the expired items and also
  375. removes the oldest one if there are no expired items.
  376. .. code-block:: yaml
  377. memcache_full_cleanup: True
  378. .. conf_master:: memcache_debug
  379. ``memcache_debug``
  380. ------------------
  381. Default: ``False``
  382. Enable collecting the memcache stats and log it on `debug` log level. If enabled
  383. memcache collect information about how many ``fetch`` calls has been done and
  384. how many of them has been hit by memcache. Also it outputs the rate value that
  385. is the result of division of the first two values. This should help to choose
  386. right values for the expiration time and the cache size.
  387. .. code-block:: yaml
  388. memcache_debug: True
  389. .. conf_master:: ext_job_cache
  390. ``ext_job_cache``
  391. -----------------
  392. Default: ``''``
  393. Used to specify a default returner for all minions. When this option is set,
  394. the specified returner needs to be properly configured and the minions will
  395. always default to sending returns to this returner. This will also disable the
  396. local job cache on the master.
  397. .. code-block:: yaml
  398. ext_job_cache: redis
  399. .. conf_master:: event_return
  400. ``event_return``
  401. ----------------
  402. .. versionadded:: 2015.5.0
  403. Default: ``''``
  404. Specify the returner(s) to use to log events. Each returner may have
  405. installation and configuration requirements. Read the returner's
  406. documentation.
  407. .. note::
  408. Not all returners support event returns. Verify that a returner has an
  409. ``event_return()`` function before configuring this option with a returner.
  410. .. code-block:: yaml
  411. event_return:
  412. - syslog
  413. - splunk
  414. .. conf_master:: event_return_queue
  415. ``event_return_queue``
  416. ----------------------
  417. .. versionadded:: 2015.5.0
  418. Default: ``0``
  419. On busy systems, enabling event_returns can cause a considerable load on
  420. the storage system for returners. Events can be queued on the master and
  421. stored in a batched fashion using a single transaction for multiple events.
  422. By default, events are not queued.
  423. .. code-block:: yaml
  424. event_return_queue: 0
  425. .. conf_master:: event_return_whitelist
  426. ``event_return_whitelist``
  427. --------------------------
  428. .. versionadded:: 2015.5.0
  429. Default: ``[]``
  430. Only return events matching tags in a whitelist.
  431. .. versionchanged:: 2016.11.0
  432. Supports glob matching patterns.
  433. .. code-block:: yaml
  434. event_return_whitelist:
  435. - salt/master/a_tag
  436. - salt/run/*/ret
  437. .. conf_master:: event_return_blacklist
  438. ``event_return_blacklist``
  439. --------------------------
  440. .. versionadded:: 2015.5.0
  441. Default: ``[]``
  442. Store all event returns _except_ the tags in a blacklist.
  443. .. versionchanged:: 2016.11.0
  444. Supports glob matching patterns.
  445. .. code-block:: yaml
  446. event_return_blacklist:
  447. - salt/master/not_this_tag
  448. - salt/wheel/*/ret
  449. .. conf_master:: max_event_size
  450. ``max_event_size``
  451. ------------------
  452. .. versionadded:: 2014.7.0
  453. Default: ``1048576``
  454. Passing very large events can cause the minion to consume large amounts of
  455. memory. This value tunes the maximum size of a message allowed onto the
  456. master event bus. The value is expressed in bytes.
  457. .. code-block:: yaml
  458. max_event_size: 1048576
  459. .. conf_master:: master_job_cache
  460. ``master_job_cache``
  461. --------------------
  462. .. versionadded:: 2014.7.0
  463. Default: ``local_cache``
  464. Specify the returner to use for the job cache. The job cache will only be
  465. interacted with from the salt master and therefore does not need to be
  466. accessible from the minions.
  467. .. code-block:: yaml
  468. master_job_cache: redis
  469. .. conf_master:: job_cache_store_endtime
  470. ``job_cache_store_endtime``
  471. ---------------------------
  472. .. versionadded:: 2015.8.0
  473. Default: ``False``
  474. Specify whether the Salt Master should store end times for jobs as returns
  475. come in.
  476. .. code-block:: yaml
  477. job_cache_store_endtime: False
  478. .. conf_master:: enforce_mine_cache
  479. ``enforce_mine_cache``
  480. ----------------------
  481. Default: False
  482. By-default when disabling the minion_data_cache mine will stop working since
  483. it is based on cached data, by enabling this option we explicitly enabling
  484. only the cache for the mine system.
  485. .. code-block:: yaml
  486. enforce_mine_cache: False
  487. .. conf_master:: max_minions
  488. ``max_minions``
  489. ---------------
  490. Default: 0
  491. The maximum number of minion connections allowed by the master. Use this to
  492. accommodate the number of minions per master if you have different types of
  493. hardware serving your minions. The default of ``0`` means unlimited connections.
  494. Please note that this can slow down the authentication process a bit in large
  495. setups.
  496. .. code-block:: yaml
  497. max_minions: 100
  498. ``con_cache``
  499. -------------
  500. Default: False
  501. If max_minions is used in large installations, the master might experience
  502. high-load situations because of having to check the number of connected
  503. minions for every authentication. This cache provides the minion-ids of
  504. all connected minions to all MWorker-processes and greatly improves the
  505. performance of max_minions.
  506. .. code-block:: yaml
  507. con_cache: True
  508. .. conf_master:: presence_events
  509. ``presence_events``
  510. -------------------
  511. Default: False
  512. Causes the master to periodically look for actively connected minions.
  513. :ref:`Presence events <event-master_presence>` are fired on the event bus on a
  514. regular interval with a list of connected minions, as well as events with lists
  515. of newly connected or disconnected minions. This is a master-only operation
  516. that does not send executions to minions.
  517. .. code-block:: yaml
  518. presence_events: False
  519. .. conf_master:: ping_on_rotate
  520. ``ping_on_rotate``
  521. ------------------
  522. .. versionadded:: 2014.7.0
  523. Default: ``False``
  524. By default, the master AES key rotates every 24 hours. The next command
  525. following a key rotation will trigger a key refresh from the minion which may
  526. result in minions which do not respond to the first command after a key refresh.
  527. To tell the master to ping all minions immediately after an AES key refresh,
  528. set ``ping_on_rotate`` to ``True``. This should mitigate the issue where a
  529. minion does not appear to initially respond after a key is rotated.
  530. Note that enabling this may cause high load on the master immediately after the
  531. key rotation event as minions reconnect. Consider this carefully if this salt
  532. master is managing a large number of minions.
  533. If disabled, it is recommended to handle this event by listening for the
  534. ``aes_key_rotate`` event with the ``key`` tag and acting appropriately.
  535. .. code-block:: yaml
  536. ping_on_rotate: False
  537. .. conf_master:: transport
  538. ``transport``
  539. -------------
  540. Default: ``zeromq``
  541. Changes the underlying transport layer. ZeroMQ is the recommended transport
  542. while additional transport layers are under development. Supported values are
  543. ``zeromq`` and ``tcp`` (experimental). This setting has a significant impact on
  544. performance and should not be changed unless you know what you are doing!
  545. .. code-block:: yaml
  546. transport: zeromq
  547. .. conf_master:: transport_opts
  548. ``transport_opts``
  549. ------------------
  550. Default: ``{}``
  551. (experimental) Starts multiple transports and overrides options for each
  552. transport with the provided dictionary This setting has a significant impact on
  553. performance and should not be changed unless you know what you are doing! The
  554. following example shows how to start a TCP transport alongside a ZMQ transport.
  555. .. code-block:: yaml
  556. transport_opts:
  557. tcp:
  558. publish_port: 4605
  559. ret_port: 4606
  560. zeromq: []
  561. .. conf_master:: master_stats
  562. ``master_stats``
  563. ----------------
  564. Default: False
  565. Turning on the master stats enables runtime throughput and statistics events
  566. to be fired from the master event bus. These events will report on what
  567. functions have been run on the master and how long these runs have, on
  568. average, taken over a given period of time.
  569. .. conf_master:: master_stats_event_iter
  570. ``master_stats_event_iter``
  571. ---------------------------
  572. Default: 60
  573. The time in seconds to fire master_stats events. This will only fire in
  574. conjunction with receiving a request to the master, idle masters will not
  575. fire these events.
  576. .. conf_master:: sock_pool_size
  577. ``sock_pool_size``
  578. ------------------
  579. Default: 1
  580. To avoid blocking waiting while writing a data to a socket, we support
  581. socket pool for Salt applications. For example, a job with a large number
  582. of target host list can cause long period blocking waiting. The option
  583. is used by ZMQ and TCP transports, and the other transport methods don't
  584. need the socket pool by definition. Most of Salt tools, including CLI,
  585. are enough to use a single bucket of socket pool. On the other hands,
  586. it is highly recommended to set the size of socket pool larger than 1
  587. for other Salt applications, especially Salt API, which must write data
  588. to socket concurrently.
  589. .. code-block:: yaml
  590. sock_pool_size: 15
  591. .. conf_master:: ipc_mode
  592. ``ipc_mode``
  593. ------------
  594. Default: ``ipc``
  595. The ipc strategy. (i.e., sockets versus tcp, etc.) Windows platforms lack
  596. POSIX IPC and must rely on TCP based inter-process communications. ``ipc_mode``
  597. is set to ``tcp`` by default on Windows.
  598. .. code-block:: yaml
  599. ipc_mode: ipc
  600. .. conf_master:: tcp_master_pub_port
  601. ``tcp_master_pub_port``
  602. -----------------------
  603. Default: ``4512``
  604. The TCP port on which events for the master should be published if ``ipc_mode`` is TCP.
  605. .. code-block:: yaml
  606. tcp_master_pub_port: 4512
  607. .. conf_master:: tcp_master_pull_port
  608. ``tcp_master_pull_port``
  609. ------------------------
  610. Default: ``4513``
  611. The TCP port on which events for the master should be pulled if ``ipc_mode`` is TCP.
  612. .. code-block:: yaml
  613. tcp_master_pull_port: 4513
  614. .. conf_master:: tcp_master_publish_pull
  615. ``tcp_master_publish_pull``
  616. ---------------------------
  617. Default: ``4514``
  618. The TCP port on which events for the master should be pulled fom and then republished onto
  619. the event bus on the master.
  620. .. code-block:: yaml
  621. tcp_master_publish_pull: 4514
  622. .. conf_master:: tcp_master_workers
  623. ``tcp_master_workers``
  624. ----------------------
  625. Default: ``4515``
  626. The TCP port for ``mworkers`` to connect to on the master.
  627. .. code-block:: yaml
  628. tcp_master_workers: 4515
  629. .. conf_master:: auth_events
  630. ``auth_events``
  631. --------------------
  632. .. versionadded:: 2017.7.3
  633. Default: ``True``
  634. Determines whether the master will fire authentication events.
  635. :ref:`Authentication events <event-master_auth>` are fired when
  636. a minion performs an authentication check with the master.
  637. .. code-block:: yaml
  638. auth_events: True
  639. .. conf_master:: minion_data_cache_events
  640. ``minion_data_cache_events``
  641. ----------------------------
  642. .. versionadded:: 2017.7.3
  643. Default: ``True``
  644. Determines whether the master will fire minion data cache events. Minion data
  645. cache events are fired when a minion requests a minion data cache refresh.
  646. .. code-block:: yaml
  647. minion_data_cache_events: True
  648. .. conf_master:: http_connect_timeout
  649. ``http_connect_timeout``
  650. ------------------------
  651. .. versionadded:: 2019.2.0
  652. Default: ``20``
  653. HTTP connection timeout in seconds.
  654. Applied when fetching files using tornado back-end.
  655. Should be greater than overall download time.
  656. .. code-block:: yaml
  657. http_connect_timeout: 20
  658. .. conf_master:: http_request_timeout
  659. ``http_request_timeout``
  660. ------------------------
  661. .. versionadded:: 2015.8.0
  662. Default: ``3600``
  663. HTTP request timeout in seconds.
  664. Applied when fetching files using tornado back-end.
  665. Should be greater than overall download time.
  666. .. code-block:: yaml
  667. http_request_timeout: 3600
  668. ``use_yamlloader_old``
  669. ------------------------
  670. .. versionadded:: 2019.2.1
  671. Default: ``False``
  672. Use the pre-2019.2 YAML renderer.
  673. Uses legacy YAML rendering to support some legacy inline data structures.
  674. See the :ref:`2019.2.1 release notes <release-2019-2-1>` for more details.
  675. .. code-block:: yaml
  676. use_yamlloader_old: False
  677. .. _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 its 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: ``''``
  1656. A master-only copy of the :conf_master:`file_roots` dictionary, used by the
  1657. state compiler.
  1658. Example:
  1659. .. code-block:: yaml
  1660. master_roots:
  1661. base:
  1662. - /srv/salt-master
  1663. roots: Master's Local File Server
  1664. ---------------------------------
  1665. .. conf_master:: file_roots
  1666. ``file_roots``
  1667. **************
  1668. Default:
  1669. .. code-block:: yaml
  1670. base:
  1671. - /srv/salt
  1672. Salt runs a lightweight file server written in ZeroMQ to deliver files to
  1673. minions. This file server is built into the master daemon and does not
  1674. require a dedicated port.
  1675. The file server works on environments passed to the master. Each environment
  1676. can have multiple root directories. The subdirectories in the multiple file
  1677. roots cannot match, otherwise the downloaded files will not be able to be
  1678. reliably ensured. A base environment is required to house the top file.
  1679. As of 2018.3.5 and 2019.2.1, it is possible to have `__env__` as a catch-all environment.
  1680. Example:
  1681. .. code-block:: yaml
  1682. file_roots:
  1683. base:
  1684. - /srv/salt
  1685. dev:
  1686. - /srv/salt/dev/services
  1687. - /srv/salt/dev/states
  1688. prod:
  1689. - /srv/salt/prod/services
  1690. - /srv/salt/prod/states
  1691. __env__:
  1692. - /srv/salt/default
  1693. .. note::
  1694. For masterless Salt, this parameter must be specified in the minion config
  1695. file.
  1696. .. conf_master:: roots_update_interval
  1697. ``roots_update_interval``
  1698. *************************
  1699. .. versionadded:: 2018.3.0
  1700. Default: ``60``
  1701. This option defines the update interval (in seconds) for
  1702. :conf_master:`file_roots`.
  1703. .. note::
  1704. Since ``file_roots`` consists of files local to the minion, the update
  1705. process for this fileserver backend just reaps the cache for this backend.
  1706. .. code-block:: yaml
  1707. roots_update_interval: 120
  1708. gitfs: Git Remote File Server Backend
  1709. -------------------------------------
  1710. .. conf_master:: gitfs_remotes
  1711. ``gitfs_remotes``
  1712. *****************
  1713. Default: ``[]``
  1714. When using the ``git`` fileserver backend at least one git remote needs to be
  1715. defined. The user running the salt master will need read access to the repo.
  1716. The repos will be searched in order to find the file requested by a client and
  1717. the first repo to have the file will return it. Branches and tags are
  1718. translated into salt environments.
  1719. .. code-block:: yaml
  1720. gitfs_remotes:
  1721. - git://github.com/saltstack/salt-states.git
  1722. - file:///var/git/saltmaster
  1723. .. note::
  1724. ``file://`` repos will be treated as a remote and copied into the master's
  1725. gitfs cache, so only the *local* refs for those repos will be exposed as
  1726. fileserver environments.
  1727. As of 2014.7.0, it is possible to have per-repo versions of several of the
  1728. gitfs configuration parameters. For more information, see the :ref:`GitFS
  1729. Walkthrough <gitfs-per-remote-config>`.
  1730. .. conf_master:: gitfs_provider
  1731. ``gitfs_provider``
  1732. ******************
  1733. .. versionadded:: 2014.7.0
  1734. Optional parameter used to specify the provider to be used for gitfs. More
  1735. information can be found in the :ref:`GitFS Walkthrough <gitfs-dependencies>`.
  1736. Must be either ``pygit2`` or ``gitpython``. If unset, then each will be tried
  1737. in that same order, and the first one with a compatible version installed will
  1738. be the provider that is used.
  1739. .. code-block:: yaml
  1740. gitfs_provider: gitpython
  1741. .. conf_master:: gitfs_ssl_verify
  1742. ``gitfs_ssl_verify``
  1743. ********************
  1744. Default: ``True``
  1745. Specifies whether or not to ignore SSL certificate errors when fetching from
  1746. the repositories configured in :conf_master:`gitfs_remotes`. The ``False``
  1747. setting is useful if you're using a git repo that uses a self-signed
  1748. certificate. However, keep in mind that setting this to anything other ``True``
  1749. is a considered insecure, and using an SSH-based transport (if available) may
  1750. be a better option.
  1751. .. code-block:: yaml
  1752. gitfs_ssl_verify: False
  1753. .. note::
  1754. pygit2 only supports disabling SSL verification in versions 0.23.2 and
  1755. newer.
  1756. .. versionchanged:: 2015.8.0
  1757. This option can now be configured on individual repositories as well. See
  1758. :ref:`here <gitfs-per-remote-config>` for more info.
  1759. .. versionchanged:: 2016.11.0
  1760. The default config value changed from ``False`` to ``True``.
  1761. .. conf_master:: gitfs_mountpoint
  1762. ``gitfs_mountpoint``
  1763. ********************
  1764. .. versionadded:: 2014.7.0
  1765. Default: ``''``
  1766. Specifies a path on the salt fileserver which will be prepended to all files
  1767. served by gitfs. This option can be used in conjunction with
  1768. :conf_master:`gitfs_root`. It can also be configured for an individual
  1769. repository, see :ref:`here <gitfs-per-remote-config>` for more info.
  1770. .. code-block:: yaml
  1771. gitfs_mountpoint: salt://foo/bar
  1772. .. note::
  1773. The ``salt://`` protocol designation can be left off (in other words,
  1774. ``foo/bar`` and ``salt://foo/bar`` are equivalent). Assuming a file
  1775. ``baz.sh`` in the root of a gitfs remote, and the above example mountpoint,
  1776. this file would be served up via ``salt://foo/bar/baz.sh``.
  1777. .. conf_master:: gitfs_root
  1778. ``gitfs_root``
  1779. **************
  1780. Default: ``''``
  1781. Relative path to a subdirectory within the repository from which Salt should
  1782. begin to serve files. This is useful when there are files in the repository
  1783. that should not be available to the Salt fileserver. Can be used in conjunction
  1784. with :conf_master:`gitfs_mountpoint`. If used, then from Salt's perspective the
  1785. directories above the one specified will be ignored and the relative path will
  1786. (for the purposes of gitfs) be considered as the root of the repo.
  1787. .. code-block:: yaml
  1788. gitfs_root: somefolder/otherfolder
  1789. .. versionchanged:: 2014.7.0
  1790. This option can now be configured on individual repositories as well. See
  1791. :ref:`here <gitfs-per-remote-config>` for more info.
  1792. .. conf_master:: gitfs_base
  1793. ``gitfs_base``
  1794. **************
  1795. Default: ``master``
  1796. Defines which branch/tag should be used as the ``base`` environment.
  1797. .. code-block:: yaml
  1798. gitfs_base: salt
  1799. .. versionchanged:: 2014.7.0
  1800. This option can now be configured on individual repositories as well. See
  1801. :ref:`here <gitfs-per-remote-config>` for more info.
  1802. .. conf_master:: gitfs_saltenv
  1803. ``gitfs_saltenv``
  1804. *****************
  1805. .. versionadded:: 2016.11.0
  1806. Default: ``[]``
  1807. Global settings for :ref:`per-saltenv configuration parameters
  1808. <gitfs-per-saltenv-config>`. Though per-saltenv configuration parameters are
  1809. typically one-off changes specific to a single gitfs remote, and thus more
  1810. often configured on a per-remote basis, this parameter can be used to specify
  1811. per-saltenv changes which should apply to all remotes. For example, the below
  1812. configuration will map the ``develop`` branch to the ``dev`` saltenv for all
  1813. gitfs remotes.
  1814. .. code-block:: yaml
  1815. gitfs_saltenv:
  1816. - dev:
  1817. - ref: develop
  1818. .. conf_master:: gitfs_disable_saltenv_mapping
  1819. ``gitfs_disable_saltenv_mapping``
  1820. *********************************
  1821. .. versionadded:: 2018.3.0
  1822. Default: ``False``
  1823. When set to ``True``, all saltenv mapping logic is disregarded (aside from
  1824. which branch/tag is mapped to the ``base`` saltenv). To use any other
  1825. environments, they must then be defined using :ref:`per-saltenv configuration
  1826. parameters <gitfs-per-saltenv-config>`.
  1827. .. code-block:: yaml
  1828. gitfs_disable_saltenv_mapping: True
  1829. .. note::
  1830. This is is a global configuration option, see :ref:`here
  1831. <gitfs-per-remote-config>` for examples of configuring it for individual
  1832. repositories.
  1833. .. conf_master:: gitfs_ref_types
  1834. ``gitfs_ref_types``
  1835. *******************
  1836. .. versionadded:: 2018.3.0
  1837. Default: ``['branch', 'tag', 'sha']``
  1838. This option defines what types of refs are mapped to fileserver environments
  1839. (i.e. saltenvs). It also sets the order of preference when there are
  1840. ambiguously-named refs (i.e. when a branch and tag both have the same name).
  1841. The below example disables mapping of both tags and SHAs, so that only branches
  1842. are mapped as saltenvs:
  1843. .. code-block:: yaml
  1844. gitfs_ref_types:
  1845. - branch
  1846. .. note::
  1847. This is is a global configuration option, see :ref:`here
  1848. <gitfs-per-remote-config>` for examples of configuring it for individual
  1849. repositories.
  1850. .. note::
  1851. ``sha`` is special in that it will not show up when listing saltenvs (e.g.
  1852. with the :py:func:`fileserver.envs <salt.runners.fileserver.envs>` runner),
  1853. but works within states and with :py:func:`cp.cache_file
  1854. <salt.modules.cp.cache_file>` to retrieve a file from a specific git SHA.
  1855. .. conf_master:: gitfs_saltenv_whitelist
  1856. ``gitfs_saltenv_whitelist``
  1857. ***************************
  1858. .. versionadded:: 2014.7.0
  1859. .. versionchanged:: 2018.3.0
  1860. Renamed from ``gitfs_env_whitelist`` to ``gitfs_saltenv_whitelist``
  1861. Default: ``[]``
  1862. Used to restrict which environments are made available. Can speed up state runs
  1863. if the repos in :conf_master:`gitfs_remotes` contain many branches/tags. More
  1864. information can be found in the :ref:`GitFS Walkthrough
  1865. <gitfs-whitelist-blacklist>`.
  1866. .. code-block:: yaml
  1867. gitfs_saltenv_whitelist:
  1868. - base
  1869. - v1.*
  1870. - 'mybranch\d+'
  1871. .. conf_master:: gitfs_saltenv_blacklist
  1872. ``gitfs_saltenv_blacklist``
  1873. ***************************
  1874. .. versionadded:: 2014.7.0
  1875. .. versionchanged:: 2018.3.0
  1876. Renamed from ``gitfs_env_blacklist`` to ``gitfs_saltenv_blacklist``
  1877. Default: ``[]``
  1878. Used to restrict which environments are made available. Can speed up state runs
  1879. if the repos in :conf_master:`gitfs_remotes` contain many branches/tags. More
  1880. information can be found in the :ref:`GitFS Walkthrough
  1881. <gitfs-whitelist-blacklist>`.
  1882. .. code-block:: yaml
  1883. gitfs_saltenv_blacklist:
  1884. - base
  1885. - v1.*
  1886. - 'mybranch\d+'
  1887. .. conf_master:: gitfs_global_lock
  1888. ``gitfs_global_lock``
  1889. *********************
  1890. .. versionadded:: 2015.8.9
  1891. Default: ``True``
  1892. When set to ``False``, if there is an update lock for a gitfs remote and the
  1893. pid written to it is not running on the master, the lock file will be
  1894. automatically cleared and a new lock will be obtained. When set to ``True``,
  1895. Salt will simply log a warning when there is an update lock present.
  1896. On single-master deployments, disabling this option can help automatically deal
  1897. with instances where the master was shutdown/restarted during the middle of a
  1898. gitfs update, leaving a update lock in place.
  1899. However, on multi-master deployments with the gitfs cachedir shared via
  1900. `GlusterFS`__, nfs, or another network filesystem, it is strongly recommended
  1901. not to disable this option as doing so will cause lock files to be removed if
  1902. they were created by a different master.
  1903. .. code-block:: yaml
  1904. # Disable global lock
  1905. gitfs_global_lock: False
  1906. .. __: http://www.gluster.org/
  1907. .. conf_master:: gitfs_update_interval
  1908. ``gitfs_update_interval``
  1909. *************************
  1910. .. versionadded:: 2018.3.0
  1911. Default: ``60``
  1912. This option defines the default update interval (in seconds) for gitfs remotes.
  1913. The update interval can also be set for a single repository via a
  1914. :ref:`per-remote config option <gitfs-per-remote-config>`
  1915. .. code-block:: yaml
  1916. gitfs_update_interval: 120
  1917. GitFS Authentication Options
  1918. ****************************
  1919. These parameters only currently apply to the pygit2 gitfs provider. Examples of
  1920. how to use these can be found in the :ref:`GitFS Walkthrough
  1921. <gitfs-authentication>`.
  1922. .. conf_master:: gitfs_user
  1923. ``gitfs_user``
  1924. ~~~~~~~~~~~~~~
  1925. .. versionadded:: 2014.7.0
  1926. Default: ``''``
  1927. Along with :conf_master:`gitfs_password`, is used to authenticate to HTTPS
  1928. remotes.
  1929. .. code-block:: yaml
  1930. gitfs_user: git
  1931. .. note::
  1932. This is is a global configuration option, see :ref:`here
  1933. <gitfs-per-remote-config>` for examples of configuring it for individual
  1934. repositories.
  1935. .. conf_master:: gitfs_password
  1936. ``gitfs_password``
  1937. ~~~~~~~~~~~~~~~~~~
  1938. .. versionadded:: 2014.7.0
  1939. Default: ``''``
  1940. Along with :conf_master:`gitfs_user`, is used to authenticate to HTTPS remotes.
  1941. This parameter is not required if the repository does not use authentication.
  1942. .. code-block:: yaml
  1943. gitfs_password: mypassword
  1944. .. note::
  1945. This is is a global configuration option, see :ref:`here
  1946. <gitfs-per-remote-config>` for examples of configuring it for individual
  1947. repositories.
  1948. .. conf_master:: gitfs_insecure_auth
  1949. ``gitfs_insecure_auth``
  1950. ~~~~~~~~~~~~~~~~~~~~~~~
  1951. .. versionadded:: 2014.7.0
  1952. Default: ``False``
  1953. By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
  1954. parameter enables authentication over HTTP. **Enable this at your own risk.**
  1955. .. code-block:: yaml
  1956. gitfs_insecure_auth: True
  1957. .. note::
  1958. This is is a global configuration option, see :ref:`here
  1959. <gitfs-per-remote-config>` for examples of configuring it for individual
  1960. repositories.
  1961. .. conf_master:: gitfs_pubkey
  1962. ``gitfs_pubkey``
  1963. ~~~~~~~~~~~~~~~~
  1964. .. versionadded:: 2014.7.0
  1965. Default: ``''``
  1966. Along with :conf_master:`gitfs_privkey` (and optionally
  1967. :conf_master:`gitfs_passphrase`), is used to authenticate to SSH remotes.
  1968. Required for SSH remotes.
  1969. .. code-block:: yaml
  1970. gitfs_pubkey: /path/to/key.pub
  1971. .. note::
  1972. This is is a global configuration option, see :ref:`here
  1973. <gitfs-per-remote-config>` for examples of configuring it for individual
  1974. repositories.
  1975. .. conf_master:: gitfs_privkey
  1976. ``gitfs_privkey``
  1977. ~~~~~~~~~~~~~~~~~
  1978. .. versionadded:: 2014.7.0
  1979. Default: ``''``
  1980. Along with :conf_master:`gitfs_pubkey` (and optionally
  1981. :conf_master:`gitfs_passphrase`), is used to authenticate to SSH remotes.
  1982. Required for SSH remotes.
  1983. .. code-block:: yaml
  1984. gitfs_privkey: /path/to/key
  1985. .. note::
  1986. This is is a global configuration option, see :ref:`here
  1987. <gitfs-per-remote-config>` for examples of configuring it for individual
  1988. repositories.
  1989. .. conf_master:: gitfs_passphrase
  1990. ``gitfs_passphrase``
  1991. ~~~~~~~~~~~~~~~~~~~~
  1992. .. versionadded:: 2014.7.0
  1993. Default: ``''``
  1994. This parameter is optional, required only when the SSH key being used to
  1995. authenticate is protected by a passphrase.
  1996. .. code-block:: yaml
  1997. gitfs_passphrase: mypassphrase
  1998. .. note::
  1999. This is is a global configuration option, see :ref:`here
  2000. <gitfs-per-remote-config>` for examples of configuring it for individual
  2001. repositories.
  2002. .. conf_master:: gitfs_refspecs
  2003. ``gitfs_refspecs``
  2004. ~~~~~~~~~~~~~~~~~~
  2005. .. versionadded:: 2017.7.0
  2006. Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']``
  2007. When fetching from remote repositories, by default Salt will fetch branches and
  2008. tags. This parameter can be used to override the default and specify
  2009. alternate refspecs to be fetched. More information on how this feature works
  2010. can be found in the :ref:`GitFS Walkthrough <gitfs-custom-refspecs>`.
  2011. .. code-block:: yaml
  2012. gitfs_refspecs:
  2013. - '+refs/heads/*:refs/remotes/origin/*'
  2014. - '+refs/tags/*:refs/tags/*'
  2015. - '+refs/pull/*/head:refs/remotes/origin/pr/*'
  2016. - '+refs/pull/*/merge:refs/remotes/origin/merge/*'
  2017. hgfs: Mercurial Remote File Server Backend
  2018. ------------------------------------------
  2019. .. conf_master:: hgfs_remotes
  2020. ``hgfs_remotes``
  2021. ****************
  2022. .. versionadded:: 0.17.0
  2023. Default: ``[]``
  2024. When using the ``hg`` fileserver backend at least one mercurial remote needs to
  2025. be defined. The user running the salt master will need read access to the repo.
  2026. The repos will be searched in order to find the file requested by a client and
  2027. the first repo to have the file will return it. Branches and/or bookmarks are
  2028. translated into salt environments, as defined by the
  2029. :conf_master:`hgfs_branch_method` parameter.
  2030. .. code-block:: yaml
  2031. hgfs_remotes:
  2032. - https://username@bitbucket.org/username/reponame
  2033. .. note::
  2034. As of 2014.7.0, it is possible to have per-repo versions of the
  2035. :conf_master:`hgfs_root`, :conf_master:`hgfs_mountpoint`,
  2036. :conf_master:`hgfs_base`, and :conf_master:`hgfs_branch_method` parameters.
  2037. For example:
  2038. .. code-block:: yaml
  2039. hgfs_remotes:
  2040. - https://username@bitbucket.org/username/repo1
  2041. - base: saltstates
  2042. - https://username@bitbucket.org/username/repo2:
  2043. - root: salt
  2044. - mountpoint: salt://foo/bar/baz
  2045. - https://username@bitbucket.org/username/repo3:
  2046. - root: salt/states
  2047. - branch_method: mixed
  2048. .. conf_master:: hgfs_branch_method
  2049. ``hgfs_branch_method``
  2050. **********************
  2051. .. versionadded:: 0.17.0
  2052. Default: ``branches``
  2053. Defines the objects that will be used as fileserver environments.
  2054. * ``branches`` - Only branches and tags will be used
  2055. * ``bookmarks`` - Only bookmarks and tags will be used
  2056. * ``mixed`` - Branches, bookmarks, and tags will be used
  2057. .. code-block:: yaml
  2058. hgfs_branch_method: mixed
  2059. .. note::
  2060. Starting in version 2014.1.0, the value of the :conf_master:`hgfs_base`
  2061. parameter defines which branch is used as the ``base`` environment,
  2062. allowing for a ``base`` environment to be used with an
  2063. :conf_master:`hgfs_branch_method` of ``bookmarks``.
  2064. Prior to this release, the ``default`` branch will be used as the ``base``
  2065. environment.
  2066. .. conf_master:: hgfs_mountpoint
  2067. ``hgfs_mountpoint``
  2068. *******************
  2069. .. versionadded:: 2014.7.0
  2070. Default: ``''``
  2071. Specifies a path on the salt fileserver which will be prepended to all files
  2072. served by hgfs. This option can be used in conjunction with
  2073. :conf_master:`hgfs_root`. It can also be configured on a per-remote basis, see
  2074. :conf_master:`here <hgfs_remotes>` for more info.
  2075. .. code-block:: yaml
  2076. hgfs_mountpoint: salt://foo/bar
  2077. .. note::
  2078. The ``salt://`` protocol designation can be left off (in other words,
  2079. ``foo/bar`` and ``salt://foo/bar`` are equivalent). Assuming a file
  2080. ``baz.sh`` in the root of an hgfs remote, this file would be served up via
  2081. ``salt://foo/bar/baz.sh``.
  2082. .. conf_master:: hgfs_root
  2083. ``hgfs_root``
  2084. *************
  2085. .. versionadded:: 0.17.0
  2086. Default: ``''``
  2087. Relative path to a subdirectory within the repository from which Salt should
  2088. begin to serve files. This is useful when there are files in the repository
  2089. that should not be available to the Salt fileserver. Can be used in conjunction
  2090. with :conf_master:`hgfs_mountpoint`. If used, then from Salt's perspective the
  2091. directories above the one specified will be ignored and the relative path will
  2092. (for the purposes of hgfs) be considered as the root of the repo.
  2093. .. code-block:: yaml
  2094. hgfs_root: somefolder/otherfolder
  2095. .. versionchanged:: 2014.7.0
  2096. Ability to specify hgfs roots on a per-remote basis was added. See
  2097. :conf_master:`here <hgfs_remotes>` for more info.
  2098. .. conf_master:: hgfs_base
  2099. ``hgfs_base``
  2100. *************
  2101. .. versionadded:: 2014.1.0
  2102. Default: ``default``
  2103. Defines which branch should be used as the ``base`` environment. Change this if
  2104. :conf_master:`hgfs_branch_method` is set to ``bookmarks`` to specify which
  2105. bookmark should be used as the ``base`` environment.
  2106. .. code-block:: yaml
  2107. hgfs_base: salt
  2108. .. conf_master:: hgfs_saltenv_whitelist
  2109. ``hgfs_saltenv_whitelist``
  2110. **************************
  2111. .. versionadded:: 2014.7.0
  2112. .. versionchanged:: 2018.3.0
  2113. Renamed from ``hgfs_env_whitelist`` to ``hgfs_saltenv_whitelist``
  2114. Default: ``[]``
  2115. Used to restrict which environments are made available. Can speed up state runs
  2116. if your hgfs remotes contain many branches/bookmarks/tags. Full names, globs,
  2117. and regular expressions are supported. If using a regular expression, the
  2118. expression must match the entire minion ID.
  2119. If used, only branches/bookmarks/tags which match one of the specified
  2120. expressions will be exposed as fileserver environments.
  2121. If used in conjunction with :conf_master:`hgfs_saltenv_blacklist`, then the subset
  2122. of branches/bookmarks/tags which match the whitelist but do *not* match the
  2123. blacklist will be exposed as fileserver environments.
  2124. .. code-block:: yaml
  2125. hgfs_saltenv_whitelist:
  2126. - base
  2127. - v1.*
  2128. - 'mybranch\d+'
  2129. .. conf_master:: hgfs_saltenv_blacklist
  2130. ``hgfs_saltenv_blacklist``
  2131. **************************
  2132. .. versionadded:: 2014.7.0
  2133. .. versionchanged:: 2018.3.0
  2134. Renamed from ``hgfs_env_blacklist`` to ``hgfs_saltenv_blacklist``
  2135. Default: ``[]``
  2136. Used to restrict which environments are made available. Can speed up state runs
  2137. if your hgfs remotes contain many branches/bookmarks/tags. Full names, globs,
  2138. and regular expressions are supported. If using a regular expression, the
  2139. expression must match the entire minion ID.
  2140. If used, branches/bookmarks/tags which match one of the specified expressions
  2141. will *not* be exposed as fileserver environments.
  2142. If used in conjunction with :conf_master:`hgfs_saltenv_whitelist`, then the subset
  2143. of branches/bookmarks/tags which match the whitelist but do *not* match the
  2144. blacklist will be exposed as fileserver environments.
  2145. .. code-block:: yaml
  2146. hgfs_saltenv_blacklist:
  2147. - base
  2148. - v1.*
  2149. - 'mybranch\d+'
  2150. .. conf_master:: hgfs_update_interval
  2151. ``hgfs_update_interval``
  2152. ************************
  2153. .. versionadded:: 2018.3.0
  2154. Default: ``60``
  2155. This option defines the update interval (in seconds) for
  2156. :conf_master:`hgfs_remotes`.
  2157. .. code-block:: yaml
  2158. hgfs_update_interval: 120
  2159. svnfs: Subversion Remote File Server Backend
  2160. --------------------------------------------
  2161. .. conf_master:: svnfs_remotes
  2162. ``svnfs_remotes``
  2163. *****************
  2164. .. versionadded:: 0.17.0
  2165. Default: ``[]``
  2166. When using the ``svn`` fileserver backend at least one subversion remote needs
  2167. to be defined. The user running the salt master will need read access to the
  2168. repo.
  2169. The repos will be searched in order to find the file requested by a client and
  2170. the first repo to have the file will return it. The trunk, branches, and tags
  2171. become environments, with the trunk being the ``base`` environment.
  2172. .. code-block:: yaml
  2173. svnfs_remotes:
  2174. - svn://foo.com/svn/myproject
  2175. .. note::
  2176. As of 2014.7.0, it is possible to have per-repo versions of the following
  2177. configuration parameters:
  2178. * :conf_master:`svnfs_root`
  2179. * :conf_master:`svnfs_mountpoint`
  2180. * :conf_master:`svnfs_trunk`
  2181. * :conf_master:`svnfs_branches`
  2182. * :conf_master:`svnfs_tags`
  2183. For example:
  2184. .. code-block:: yaml
  2185. svnfs_remotes:
  2186. - svn://foo.com/svn/project1
  2187. - svn://foo.com/svn/project2:
  2188. - root: salt
  2189. - mountpoint: salt://foo/bar/baz
  2190. - svn//foo.com/svn/project3:
  2191. - root: salt/states
  2192. - branches: branch
  2193. - tags: tag
  2194. .. conf_master:: svnfs_mountpoint
  2195. ``svnfs_mountpoint``
  2196. ********************
  2197. .. versionadded:: 2014.7.0
  2198. Default: ``''``
  2199. Specifies a path on the salt fileserver which will be prepended to all files
  2200. served by hgfs. This option can be used in conjunction with
  2201. :conf_master:`svnfs_root`. It can also be configured on a per-remote basis, see
  2202. :conf_master:`here <svnfs_remotes>` for more info.
  2203. .. code-block:: yaml
  2204. svnfs_mountpoint: salt://foo/bar
  2205. .. note::
  2206. The ``salt://`` protocol designation can be left off (in other words,
  2207. ``foo/bar`` and ``salt://foo/bar`` are equivalent). Assuming a file
  2208. ``baz.sh`` in the root of an svnfs remote, this file would be served up via
  2209. ``salt://foo/bar/baz.sh``.
  2210. .. conf_master:: svnfs_root
  2211. ``svnfs_root``
  2212. **************
  2213. .. versionadded:: 0.17.0
  2214. Default: ``''``
  2215. Relative path to a subdirectory within the repository from which Salt should
  2216. begin to serve files. This is useful when there are files in the repository
  2217. that should not be available to the Salt fileserver. Can be used in conjunction
  2218. with :conf_master:`svnfs_mountpoint`. If used, then from Salt's perspective the
  2219. directories above the one specified will be ignored and the relative path will
  2220. (for the purposes of svnfs) be considered as the root of the repo.
  2221. .. code-block:: yaml
  2222. svnfs_root: somefolder/otherfolder
  2223. .. versionchanged:: 2014.7.0
  2224. Ability to specify svnfs roots on a per-remote basis was added. See
  2225. :conf_master:`here <svnfs_remotes>` for more info.
  2226. .. conf_master:: svnfs_trunk
  2227. ``svnfs_trunk``
  2228. ***************
  2229. .. versionadded:: 2014.7.0
  2230. Default: ``trunk``
  2231. Path relative to the root of the repository where the trunk is located. Can
  2232. also be configured on a per-remote basis, see :conf_master:`here
  2233. <svnfs_remotes>` for more info.
  2234. .. code-block:: yaml
  2235. svnfs_trunk: trunk
  2236. .. conf_master:: svnfs_branches
  2237. ``svnfs_branches``
  2238. ******************
  2239. .. versionadded:: 2014.7.0
  2240. Default: ``branches``
  2241. Path relative to the root of the repository where the branches are located. Can
  2242. also be configured on a per-remote basis, see :conf_master:`here
  2243. <svnfs_remotes>` for more info.
  2244. .. code-block:: yaml
  2245. svnfs_branches: branches
  2246. .. conf_master:: svnfs_tags
  2247. ``svnfs_tags``
  2248. **************
  2249. .. versionadded:: 2014.7.0
  2250. Default: ``tags``
  2251. Path relative to the root of the repository where the tags are located. Can
  2252. also be configured on a per-remote basis, see :conf_master:`here
  2253. <svnfs_remotes>` for more info.
  2254. .. code-block:: yaml
  2255. svnfs_tags: tags
  2256. .. conf_master:: svnfs_saltenv_whitelist
  2257. ``svnfs_saltenv_whitelist``
  2258. ***************************
  2259. .. versionadded:: 2014.7.0
  2260. .. versionchanged:: 2018.3.0
  2261. Renamed from ``svnfs_env_whitelist`` to ``svnfs_saltenv_whitelist``
  2262. Default: ``[]``
  2263. Used to restrict which environments are made available. Can speed up state runs
  2264. if your svnfs remotes contain many branches/tags. Full names, globs, and
  2265. regular expressions are supported. If using a regular expression, the expression
  2266. must match the entire minion ID.
  2267. If used, only branches/tags which match one of the specified expressions will
  2268. be exposed as fileserver environments.
  2269. If used in conjunction with :conf_master:`svnfs_saltenv_blacklist`, then the subset
  2270. of branches/tags which match the whitelist but do *not* match the blacklist
  2271. will be exposed as fileserver environments.
  2272. .. code-block:: yaml
  2273. svnfs_saltenv_whitelist:
  2274. - base
  2275. - v1.*
  2276. - 'mybranch\d+'
  2277. .. conf_master:: svnfs_saltenv_blacklist
  2278. ``svnfs_saltenv_blacklist``
  2279. ***************************
  2280. .. versionadded:: 2014.7.0
  2281. .. versionchanged:: 2018.3.0
  2282. Renamed from ``svnfs_env_blacklist`` to ``svnfs_saltenv_blacklist``
  2283. Default: ``[]``
  2284. Used to restrict which environments are made available. Can speed up state runs
  2285. if your svnfs remotes contain many branches/tags. Full names, globs, and
  2286. regular expressions are supported. If using a regular expression, the
  2287. expression must match the entire minion ID.
  2288. If used, branches/tags which match one of the specified expressions will *not*
  2289. be exposed as fileserver environments.
  2290. If used in conjunction with :conf_master:`svnfs_saltenv_whitelist`, then the subset
  2291. of branches/tags which match the whitelist but do *not* match the blacklist
  2292. will be exposed as fileserver environments.
  2293. .. code-block:: yaml
  2294. svnfs_saltenv_blacklist:
  2295. - base
  2296. - v1.*
  2297. - 'mybranch\d+'
  2298. .. conf_master:: svnfs_update_interval
  2299. ``svnfs_update_interval``
  2300. *************************
  2301. .. versionadded:: 2018.3.0
  2302. Default: ``60``
  2303. This option defines the update interval (in seconds) for
  2304. :conf_master:`svnfs_remotes`.
  2305. .. code-block:: yaml
  2306. svnfs_update_interval: 120
  2307. minionfs: MinionFS Remote File Server Backend
  2308. ---------------------------------------------
  2309. .. conf_master:: minionfs_env
  2310. ``minionfs_env``
  2311. ****************
  2312. .. versionadded:: 2014.7.0
  2313. Default: ``base``
  2314. Environment from which MinionFS files are made available.
  2315. .. code-block:: yaml
  2316. minionfs_env: minionfs
  2317. .. conf_master:: minionfs_mountpoint
  2318. ``minionfs_mountpoint``
  2319. ***********************
  2320. .. versionadded:: 2014.7.0
  2321. Default: ``''``
  2322. Specifies a path on the salt fileserver from which minionfs files are served.
  2323. .. code-block:: yaml
  2324. minionfs_mountpoint: salt://foo/bar
  2325. .. note::
  2326. The ``salt://`` protocol designation can be left off (in other words,
  2327. ``foo/bar`` and ``salt://foo/bar`` are equivalent).
  2328. .. conf_master:: minionfs_whitelist
  2329. ``minionfs_whitelist``
  2330. **********************
  2331. .. versionadded:: 2014.7.0
  2332. Default: ``[]``
  2333. Used to restrict which minions' pushed files are exposed via minionfs. If using
  2334. a regular expression, the expression must match the entire minion ID.
  2335. If used, only the pushed files from minions which match one of the specified
  2336. expressions will be exposed.
  2337. If used in conjunction with :conf_master:`minionfs_blacklist`, then the subset
  2338. of hosts which match the whitelist but do *not* match the blacklist will be
  2339. exposed.
  2340. .. code-block:: yaml
  2341. minionfs_whitelist:
  2342. - server01
  2343. - dev*
  2344. - 'mail\d+.mydomain.tld'
  2345. .. conf_master:: minionfs_blacklist
  2346. ``minionfs_blacklist``
  2347. **********************
  2348. .. versionadded:: 2014.7.0
  2349. Default: ``[]``
  2350. Used to restrict which minions' pushed files are exposed via minionfs. If using
  2351. a regular expression, the expression must match the entire minion ID.
  2352. If used, only the pushed files from minions which match one of the specified
  2353. expressions will *not* be exposed.
  2354. If used in conjunction with :conf_master:`minionfs_whitelist`, then the subset
  2355. of hosts which match the whitelist but do *not* match the blacklist will be
  2356. exposed.
  2357. .. code-block:: yaml
  2358. minionfs_blacklist:
  2359. - server01
  2360. - dev*
  2361. - 'mail\d+.mydomain.tld'
  2362. .. conf_master:: minionfs_update_interval
  2363. ``minionfs_update_interval``
  2364. ****************************
  2365. .. versionadded:: 2018.3.0
  2366. Default: ``60``
  2367. This option defines the update interval (in seconds) for :ref:`MinionFS
  2368. <tutorial-minionfs>`.
  2369. .. note::
  2370. Since :ref:`MinionFS <tutorial-minionfs>` consists of files local to the
  2371. master, the update process for this fileserver backend just reaps the cache
  2372. for this backend.
  2373. .. code-block:: yaml
  2374. minionfs_update_interval: 120
  2375. azurefs: Azure File Server Backend
  2376. ----------------------------------
  2377. .. versionadded:: 2015.8.0
  2378. See the :mod:`azurefs documentation <salt.fileserver.azurefs>` for usage
  2379. examples.
  2380. .. conf_master:: azurefs_update_interval
  2381. ``azurefs_update_interval``
  2382. ***************************
  2383. .. versionadded:: 2018.3.0
  2384. Default: ``60``
  2385. This option defines the update interval (in seconds) for azurefs.
  2386. .. code-block:: yaml
  2387. azurefs_update_interval: 120
  2388. s3fs: S3 File Server Backend
  2389. ----------------------------
  2390. .. versionadded:: 0.16.0
  2391. See the :mod:`s3fs documentation <salt.fileserver.s3fs>` for usage examples.
  2392. .. conf_master:: s3fs_update_interval
  2393. ``s3fs_update_interval``
  2394. ************************
  2395. .. versionadded:: 2018.3.0
  2396. Default: ``60``
  2397. This option defines the update interval (in seconds) for s3fs.
  2398. .. code-block:: yaml
  2399. s3fs_update_interval: 120
  2400. .. _pillar-configuration-master:
  2401. Pillar Configuration
  2402. ====================
  2403. .. conf_master:: pillar_roots
  2404. ``pillar_roots``
  2405. ----------------
  2406. Default:
  2407. .. code-block:: yaml
  2408. base:
  2409. - /srv/pillar
  2410. Set the environments and directories used to hold pillar sls data. This
  2411. configuration is the same as :conf_master:`file_roots`:
  2412. As of 2017.7.5 and 2018.3.1, it is possible to have `__env__` as a catch-all environment.
  2413. Example:
  2414. .. code-block:: yaml
  2415. pillar_roots:
  2416. base:
  2417. - /srv/pillar
  2418. dev:
  2419. - /srv/pillar/dev
  2420. prod:
  2421. - /srv/pillar/prod
  2422. __env__:
  2423. - /srv/pillar/others
  2424. .. conf_master:: on_demand_ext_pillar
  2425. ``on_demand_ext_pillar``
  2426. ------------------------
  2427. .. versionadded:: 2016.3.6,2016.11.3,2017.7.0
  2428. Default: ``['libvirt', 'virtkey']``
  2429. The external pillars permitted to be used on-demand using :py:func:`pillar.ext
  2430. <salt.modules.pillar.ext>`.
  2431. .. code-block:: yaml
  2432. on_demand_ext_pillar:
  2433. - libvirt
  2434. - virtkey
  2435. - git
  2436. .. warning::
  2437. This will allow minions to request specific pillar data via
  2438. :py:func:`pillar.ext <salt.modules.pillar.ext>`, and may be considered a
  2439. security risk. However, pillar data generated in this way will not affect
  2440. the :ref:`in-memory pillar data <pillar-in-memory>`, so this risk is
  2441. limited to instances in which states/modules/etc. (built-in or custom) rely
  2442. upon pillar data generated by :py:func:`pillar.ext
  2443. <salt.modules.pillar.ext>`.
  2444. .. conf_master:: decrypt_pillar
  2445. ``decrypt_pillar``
  2446. ------------------
  2447. .. versionadded:: 2017.7.0
  2448. Default: ``[]``
  2449. A list of paths to be recursively decrypted during pillar compilation.
  2450. .. code-block:: yaml
  2451. decrypt_pillar:
  2452. - 'foo:bar': gpg
  2453. - 'lorem:ipsum:dolor'
  2454. Entries in this list can be formatted either as a simple string, or as a
  2455. key/value pair, with the key being the pillar location, and the value being the
  2456. renderer to use for pillar decryption. If the former is used, the renderer
  2457. specified by :conf_master:`decrypt_pillar_default` will be used.
  2458. .. conf_master:: decrypt_pillar_delimiter
  2459. ``decrypt_pillar_delimiter``
  2460. ----------------------------
  2461. .. versionadded:: 2017.7.0
  2462. Default: ``:``
  2463. The delimiter used to distinguish nested data structures in the
  2464. :conf_master:`decrypt_pillar` option.
  2465. .. code-block:: yaml
  2466. decrypt_pillar_delimiter: '|'
  2467. decrypt_pillar:
  2468. - 'foo|bar': gpg
  2469. - 'lorem|ipsum|dolor'
  2470. .. conf_master:: decrypt_pillar_default
  2471. ``decrypt_pillar_default``
  2472. --------------------------
  2473. .. versionadded:: 2017.7.0
  2474. Default: ``gpg``
  2475. The default renderer used for decryption, if one is not specified for a given
  2476. pillar key in :conf_master:`decrypt_pillar`.
  2477. .. code-block:: yaml
  2478. decrypt_pillar_default: my_custom_renderer
  2479. .. conf_master:: decrypt_pillar_renderers
  2480. ``decrypt_pillar_renderers``
  2481. ----------------------------
  2482. .. versionadded:: 2017.7.0
  2483. Default: ``['gpg']``
  2484. List of renderers which are permitted to be used for pillar decryption.
  2485. .. code-block:: yaml
  2486. decrypt_pillar_renderers:
  2487. - gpg
  2488. - my_custom_renderer
  2489. .. conf_master:: pillar_opts
  2490. ``pillar_opts``
  2491. ---------------
  2492. Default: ``False``
  2493. The ``pillar_opts`` option adds the master configuration file data to a dict in
  2494. the pillar called ``master``. This can be used to set simple configurations in
  2495. the master config file that can then be used on minions.
  2496. Note that setting this option to ``True`` means the master config file will be
  2497. included in all minion's pillars. While this makes global configuration of services
  2498. and systems easy, it may not be desired if sensitive data is stored in the master
  2499. configuration.
  2500. .. code-block:: yaml
  2501. pillar_opts: False
  2502. .. conf_master:: pillar_safe_render_error
  2503. ``pillar_safe_render_error``
  2504. ----------------------------
  2505. Default: ``True``
  2506. The pillar_safe_render_error option prevents the master from passing pillar
  2507. render errors to the minion. This is set on by default because the error could
  2508. contain templating data which would give that minion information it shouldn't
  2509. have, like a password! When set ``True`` the error message will only show:
  2510. .. code-block:: shell
  2511. Rendering SLS 'my.sls' failed. Please see master log for details.
  2512. .. code-block:: yaml
  2513. pillar_safe_render_error: True
  2514. .. _master-configuration-ext-pillar:
  2515. .. conf_master:: ext_pillar
  2516. ``ext_pillar``
  2517. --------------
  2518. The ext_pillar option allows for any number of external pillar interfaces to be
  2519. called when populating pillar data. The configuration is based on ext_pillar
  2520. functions. The available ext_pillar functions can be found herein:
  2521. :blob:`salt/pillar`
  2522. By default, the ext_pillar interface is not configured to run.
  2523. Default: ``[]``
  2524. .. code-block:: yaml
  2525. ext_pillar:
  2526. - hiera: /etc/hiera.yaml
  2527. - cmd_yaml: cat /etc/salt/yaml
  2528. - reclass:
  2529. inventory_base_uri: /etc/reclass
  2530. There are additional details at :ref:`salt-pillars`
  2531. .. conf_master:: ext_pillar_first
  2532. ``ext_pillar_first``
  2533. --------------------
  2534. .. versionadded:: 2015.5.0
  2535. Default: ``False``
  2536. This option allows for external pillar sources to be evaluated before
  2537. :conf_master:`pillar_roots`. External pillar data is evaluated separately from
  2538. :conf_master:`pillar_roots` pillar data, and then both sets of pillar data are
  2539. merged into a single pillar dictionary, so the value of this config option will
  2540. have an impact on which key "wins" when there is one of the same name in both
  2541. the external pillar data and :conf_master:`pillar_roots` pillar data. By
  2542. setting this option to ``True``, ext_pillar keys will be overridden by
  2543. :conf_master:`pillar_roots`, while leaving it as ``False`` will allow
  2544. ext_pillar keys to override those from :conf_master:`pillar_roots`.
  2545. .. note::
  2546. For a while, this config option did not work as specified above, because of
  2547. a bug in Pillar compilation. This bug has been resolved in version 2016.3.4
  2548. and later.
  2549. .. code-block:: yaml
  2550. ext_pillar_first: False
  2551. .. conf_master:: pillarenv_from_saltenv
  2552. ``pillarenv_from_saltenv``
  2553. --------------------------
  2554. Default: ``False``
  2555. When set to ``True``, the :conf_master:`pillarenv` value will assume the value
  2556. of the effective saltenv when running states. This essentially makes ``salt-run
  2557. pillar.show_pillar saltenv=dev`` equivalent to ``salt-run pillar.show_pillar
  2558. saltenv=dev pillarenv=dev``. If :conf_master:`pillarenv` is set on the CLI, it
  2559. will override this option.
  2560. .. code-block:: yaml
  2561. pillarenv_from_saltenv: True
  2562. .. note::
  2563. For salt remote execution commands this option should be set in the Minion
  2564. configuration instead.
  2565. .. conf_master:: pillar_raise_on_missing
  2566. ``pillar_raise_on_missing``
  2567. ---------------------------
  2568. .. versionadded:: 2015.5.0
  2569. Default: ``False``
  2570. Set this option to ``True`` to force a ``KeyError`` to be raised whenever an
  2571. attempt to retrieve a named value from pillar fails. When this option is set
  2572. to ``False``, the failed attempt returns an empty string.
  2573. .. _git-pillar-config-opts:
  2574. Git External Pillar (git_pillar) Configuration Options
  2575. ------------------------------------------------------
  2576. .. conf_master:: git_pillar_provider
  2577. ``git_pillar_provider``
  2578. ***********************
  2579. .. versionadded:: 2015.8.0
  2580. Specify the provider to be used for git_pillar. Must be either ``pygit2`` or
  2581. ``gitpython``. If unset, then both will be tried in that same order, and the
  2582. first one with a compatible version installed will be the provider that is
  2583. used.
  2584. .. code-block:: yaml
  2585. git_pillar_provider: gitpython
  2586. .. conf_master:: git_pillar_base
  2587. ``git_pillar_base``
  2588. *******************
  2589. .. versionadded:: 2015.8.0
  2590. Default: ``master``
  2591. If the desired branch matches this value, and the environment is omitted from
  2592. the git_pillar configuration, then the environment for that git_pillar remote
  2593. will be ``base``. For example, in the configuration below, the ``foo``
  2594. branch/tag would be assigned to the ``base`` environment, while ``bar`` would
  2595. be mapped to the ``bar`` environment.
  2596. .. code-block:: yaml
  2597. git_pillar_base: foo
  2598. ext_pillar:
  2599. - git:
  2600. - foo https://mygitserver/git-pillar.git
  2601. - bar https://mygitserver/git-pillar.git
  2602. .. conf_master:: git_pillar_branch
  2603. ``git_pillar_branch``
  2604. *********************
  2605. .. versionadded:: 2015.8.0
  2606. Default: ``master``
  2607. If the branch is omitted from a git_pillar remote, then this branch will be
  2608. used instead. For example, in the configuration below, the first two remotes
  2609. would use the ``pillardata`` branch/tag, while the third would use the ``foo``
  2610. branch/tag.
  2611. .. code-block:: yaml
  2612. git_pillar_branch: pillardata
  2613. ext_pillar:
  2614. - git:
  2615. - https://mygitserver/pillar1.git
  2616. - https://mygitserver/pillar2.git:
  2617. - root: pillar
  2618. - foo https://mygitserver/pillar3.git
  2619. .. conf_master:: git_pillar_env
  2620. ``git_pillar_env``
  2621. ******************
  2622. .. versionadded:: 2015.8.0
  2623. Default: ``''`` (unset)
  2624. Environment to use for git_pillar remotes. This is normally derived from the
  2625. branch/tag (or from a per-remote ``env`` parameter), but if set this will
  2626. override the process of deriving the env from the branch/tag name. For example,
  2627. in the configuration below the ``foo`` branch would be assigned to the ``base``
  2628. environment, while the ``bar`` branch would need to explicitly have ``bar``
  2629. configured as its environment to keep it from also being mapped to the
  2630. ``base`` environment.
  2631. .. code-block:: yaml
  2632. git_pillar_env: base
  2633. ext_pillar:
  2634. - git:
  2635. - foo https://mygitserver/git-pillar.git
  2636. - bar https://mygitserver/git-pillar.git:
  2637. - env: bar
  2638. For this reason, this option is recommended to be left unset, unless the use
  2639. case calls for all (or almost all) of the git_pillar remotes to use the same
  2640. environment irrespective of the branch/tag being used.
  2641. .. conf_master:: git_pillar_root
  2642. ``git_pillar_root``
  2643. *******************
  2644. .. versionadded:: 2015.8.0
  2645. Default: ``''``
  2646. Path relative to the root of the repository where the git_pillar top file and
  2647. SLS files are located. In the below configuration, the pillar top file and SLS
  2648. files would be looked for in a subdirectory called ``pillar``.
  2649. .. code-block:: yaml
  2650. git_pillar_root: pillar
  2651. ext_pillar:
  2652. - git:
  2653. - master https://mygitserver/pillar1.git
  2654. - master https://mygitserver/pillar2.git
  2655. .. note::
  2656. This is a global option. If only one or two repos need to have their files
  2657. sourced from a subdirectory, then :conf_master:`git_pillar_root` can be
  2658. omitted and the root can be specified on a per-remote basis, like so:
  2659. .. code-block:: yaml
  2660. ext_pillar:
  2661. - git:
  2662. - master https://mygitserver/pillar1.git
  2663. - master https://mygitserver/pillar2.git:
  2664. - root: pillar
  2665. In this example, for the first remote the top file and SLS files would be
  2666. looked for in the root of the repository, while in the second remote the
  2667. pillar data would be retrieved from the ``pillar`` subdirectory.
  2668. .. conf_master:: git_pillar_ssl_verify
  2669. ``git_pillar_ssl_verify``
  2670. *************************
  2671. .. versionadded:: 2015.8.0
  2672. .. versionchanged:: 2016.11.0
  2673. Default: ``False``
  2674. Specifies whether or not to ignore SSL certificate errors when contacting the
  2675. remote repository. The ``False`` setting is useful if you're using a
  2676. git repo that uses a self-signed certificate. However, keep in mind that
  2677. setting this to anything other ``True`` is a considered insecure, and using an
  2678. SSH-based transport (if available) may be a better option.
  2679. In the 2016.11.0 release, the default config value changed from ``False`` to
  2680. ``True``.
  2681. .. code-block:: yaml
  2682. git_pillar_ssl_verify: True
  2683. .. note::
  2684. pygit2 only supports disabling SSL verification in versions 0.23.2 and
  2685. newer.
  2686. .. conf_master:: git_pillar_global_lock
  2687. ``git_pillar_global_lock``
  2688. **************************
  2689. .. versionadded:: 2015.8.9
  2690. Default: ``True``
  2691. When set to ``False``, if there is an update/checkout lock for a git_pillar
  2692. remote and the pid written to it is not running on the master, the lock file
  2693. will be automatically cleared and a new lock will be obtained. When set to
  2694. ``True``, Salt will simply log a warning when there is an lock present.
  2695. On single-master deployments, disabling this option can help automatically deal
  2696. with instances where the master was shutdown/restarted during the middle of a
  2697. git_pillar update/checkout, leaving a lock in place.
  2698. However, on multi-master deployments with the git_pillar cachedir shared via
  2699. `GlusterFS`__, nfs, or another network filesystem, it is strongly recommended
  2700. not to disable this option as doing so will cause lock files to be removed if
  2701. they were created by a different master.
  2702. .. code-block:: yaml
  2703. # Disable global lock
  2704. git_pillar_global_lock: False
  2705. .. __: http://www.gluster.org/
  2706. .. conf_master:: git_pillar_includes
  2707. ``git_pillar_includes``
  2708. ***********************
  2709. .. versionadded:: 2017.7.0
  2710. Default: ``True``
  2711. Normally, when processing :ref:`git_pillar remotes
  2712. <git-pillar-configuration>`, if more than one repo under the same ``git``
  2713. section in the ``ext_pillar`` configuration refers to the same pillar
  2714. environment, then each repo in a given environment will have access to the
  2715. other repos' files to be referenced in their top files. However, it may be
  2716. desirable to disable this behavior. If so, set this value to ``False``.
  2717. For a more detailed examination of how includes work, see :ref:`this
  2718. explanation <git-pillar-multiple-remotes>` from the git_pillar documentation.
  2719. .. code-block:: yaml
  2720. git_pillar_includes: False
  2721. ``git_pillar_update_interval``
  2722. ******************************
  2723. .. versionadded:: 3000
  2724. Default: ``60``
  2725. This option defines the default update interval (in seconds) for git_pillar
  2726. remotes. The update is handled within the global loop, hence
  2727. ``git_pillar_update_interval`` should be a multiple of ``loop_interval``.
  2728. .. code-block:: yaml
  2729. git_pillar_update_interval: 120
  2730. .. _git-ext-pillar-auth-opts:
  2731. Git External Pillar Authentication Options
  2732. ******************************************
  2733. These parameters only currently apply to the ``pygit2``
  2734. :conf_master:`git_pillar_provider`. Authentication works the same as it does
  2735. in gitfs, as outlined in the :ref:`GitFS Walkthrough <gitfs-authentication>`,
  2736. though the global configuration options are named differently to reflect that
  2737. they are for git_pillar instead of gitfs.
  2738. .. conf_master:: git_pillar_user
  2739. ``git_pillar_user``
  2740. ~~~~~~~~~~~~~~~~~~~
  2741. .. versionadded:: 2015.8.0
  2742. Default: ``''``
  2743. Along with :conf_master:`git_pillar_password`, is used to authenticate to HTTPS
  2744. remotes.
  2745. .. code-block:: yaml
  2746. git_pillar_user: git
  2747. .. conf_master:: git_pillar_password
  2748. ``git_pillar_password``
  2749. ~~~~~~~~~~~~~~~~~~~~~~~
  2750. .. versionadded:: 2015.8.0
  2751. Default: ``''``
  2752. Along with :conf_master:`git_pillar_user`, is used to authenticate to HTTPS
  2753. remotes. This parameter is not required if the repository does not use
  2754. authentication.
  2755. .. code-block:: yaml
  2756. git_pillar_password: mypassword
  2757. .. conf_master:: git_pillar_insecure_auth
  2758. ``git_pillar_insecure_auth``
  2759. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2760. .. versionadded:: 2015.8.0
  2761. Default: ``False``
  2762. By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
  2763. parameter enables authentication over HTTP. **Enable this at your own risk.**
  2764. .. code-block:: yaml
  2765. git_pillar_insecure_auth: True
  2766. .. conf_master:: git_pillar_pubkey
  2767. ``git_pillar_pubkey``
  2768. ~~~~~~~~~~~~~~~~~~~~~
  2769. .. versionadded:: 2015.8.0
  2770. Default: ``''``
  2771. Along with :conf_master:`git_pillar_privkey` (and optionally
  2772. :conf_master:`git_pillar_passphrase`), is used to authenticate to SSH remotes.
  2773. .. code-block:: yaml
  2774. git_pillar_pubkey: /path/to/key.pub
  2775. .. conf_master:: git_pillar_privkey
  2776. ``git_pillar_privkey``
  2777. ~~~~~~~~~~~~~~~~~~~~~~
  2778. .. versionadded:: 2015.8.0
  2779. Default: ``''``
  2780. Along with :conf_master:`git_pillar_pubkey` (and optionally
  2781. :conf_master:`git_pillar_passphrase`), is used to authenticate to SSH remotes.
  2782. .. code-block:: yaml
  2783. git_pillar_privkey: /path/to/key
  2784. .. conf_master:: git_pillar_passphrase
  2785. ``git_pillar_passphrase``
  2786. ~~~~~~~~~~~~~~~~~~~~~~~~~
  2787. .. versionadded:: 2015.8.0
  2788. Default: ``''``
  2789. This parameter is optional, required only when the SSH key being used to
  2790. authenticate is protected by a passphrase.
  2791. .. code-block:: yaml
  2792. git_pillar_passphrase: mypassphrase
  2793. .. conf_master:: git_pillar_refspecs
  2794. ``git_pillar_refspecs``
  2795. ~~~~~~~~~~~~~~~~~~~~~~~
  2796. .. versionadded:: 2017.7.0
  2797. Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']``
  2798. When fetching from remote repositories, by default Salt will fetch branches and
  2799. tags. This parameter can be used to override the default and specify
  2800. alternate refspecs to be fetched. This parameter works similarly to its
  2801. :ref:`GitFS counterpart <gitfs-custom-refspecs>`, in that it can be
  2802. configured both globally and for individual remotes.
  2803. .. code-block:: yaml
  2804. git_pillar_refspecs:
  2805. - '+refs/heads/*:refs/remotes/origin/*'
  2806. - '+refs/tags/*:refs/tags/*'
  2807. - '+refs/pull/*/head:refs/remotes/origin/pr/*'
  2808. - '+refs/pull/*/merge:refs/remotes/origin/merge/*'
  2809. .. conf_master:: git_pillar_verify_config
  2810. ``git_pillar_verify_config``
  2811. ----------------------------
  2812. .. versionadded:: 2017.7.0
  2813. Default: ``True``
  2814. By default, as the master starts it performs some sanity checks on the
  2815. configured git_pillar repositories. If any of these sanity checks fail (such as
  2816. when an invalid configuration is used), the master daemon will abort.
  2817. To skip these sanity checks, set this option to ``False``.
  2818. .. code-block:: yaml
  2819. git_pillar_verify_config: False
  2820. .. _pillar-merging-opts:
  2821. Pillar Merging Options
  2822. ----------------------
  2823. .. conf_master:: pillar_source_merging_strategy
  2824. ``pillar_source_merging_strategy``
  2825. **********************************
  2826. .. versionadded:: 2014.7.0
  2827. Default: ``smart``
  2828. The pillar_source_merging_strategy option allows you to configure merging
  2829. strategy between different sources. It accepts 5 values:
  2830. * ``none``:
  2831. 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.
  2832. .. versionadded:: 2016.3.4
  2833. * ``recurse``:
  2834. It will recursively merge data. For example, theses 2 sources:
  2835. .. code-block:: yaml
  2836. foo: 42
  2837. bar:
  2838. element1: True
  2839. .. code-block:: yaml
  2840. bar:
  2841. element2: True
  2842. baz: quux
  2843. will be merged as:
  2844. .. code-block:: yaml
  2845. foo: 42
  2846. bar:
  2847. element1: True
  2848. element2: True
  2849. baz: quux
  2850. * ``aggregate``:
  2851. instructs aggregation of elements between sources that use the #!yamlex renderer.
  2852. For example, these two documents:
  2853. .. code-block:: yaml
  2854. #!yamlex
  2855. foo: 42
  2856. bar: !aggregate {
  2857. element1: True
  2858. }
  2859. baz: !aggregate quux
  2860. .. code-block:: yaml
  2861. #!yamlex
  2862. bar: !aggregate {
  2863. element2: True
  2864. }
  2865. baz: !aggregate quux2
  2866. will be merged as:
  2867. .. code-block:: yaml
  2868. foo: 42
  2869. bar:
  2870. element1: True
  2871. element2: True
  2872. baz:
  2873. - quux
  2874. - quux2
  2875. * ``overwrite``:
  2876. Will use the behaviour of the 2014.1 branch and earlier.
  2877. Overwrites elements according the order in which they are processed.
  2878. First pillar processed:
  2879. .. code-block:: yaml
  2880. A:
  2881. first_key: blah
  2882. second_key: blah
  2883. Second pillar processed:
  2884. .. code-block:: yaml
  2885. A:
  2886. third_key: blah
  2887. fourth_key: blah
  2888. will be merged as:
  2889. .. code-block:: yaml
  2890. A:
  2891. third_key: blah
  2892. fourth_key: blah
  2893. * ``smart`` (default):
  2894. Guesses the best strategy based on the "renderer" setting.
  2895. .. note::
  2896. In order for yamlex based features such as ``!aggregate`` to work as expected
  2897. across documents using the default ``smart`` merge strategy, the :conf_master:`renderer`
  2898. config option must be set to ``jinja|yamlex`` or similar.
  2899. .. conf_master:: pillar_merge_lists
  2900. ``pillar_merge_lists``
  2901. **********************
  2902. .. versionadded:: 2015.8.0
  2903. Default: ``False``
  2904. Recursively merge lists by aggregating them instead of replacing them.
  2905. .. code-block:: yaml
  2906. pillar_merge_lists: False
  2907. .. conf_master:: pillar_includes_override_sls
  2908. ``pillar_includes_override_sls``
  2909. ********************************
  2910. .. versionadded:: 2017.7.6,2018.3.1
  2911. Default: ``False``
  2912. Prior to version 2017.7.3, keys from :ref:`pillar includes <pillar-include>`
  2913. would be merged on top of the pillar SLS. Since 2017.7.3, the includes are
  2914. merged together and then the pillar SLS is merged on top of that.
  2915. Set this option to ``True`` to return to the old behavior.
  2916. .. code-block:: yaml
  2917. pillar_includes_override_sls: True
  2918. .. _pillar-cache-opts:
  2919. Pillar Cache Options
  2920. --------------------
  2921. .. conf_master:: pillar_cache
  2922. ``pillar_cache``
  2923. ****************
  2924. .. versionadded:: 2015.8.8
  2925. Default: ``False``
  2926. A master can cache pillars locally to bypass the expense of having to render them
  2927. for each minion on every request. This feature should only be enabled in cases
  2928. where pillar rendering time is known to be unsatisfactory and any attendant security
  2929. concerns about storing pillars in a master cache have been addressed.
  2930. When enabling this feature, be certain to read through the additional ``pillar_cache_*``
  2931. configuration options to fully understand the tunable parameters and their implications.
  2932. .. code-block:: yaml
  2933. pillar_cache: False
  2934. .. note::
  2935. Setting ``pillar_cache: True`` has no effect on
  2936. :ref:`targeting minions with pillar <targeting-pillar>`.
  2937. .. conf_master:: pillar_cache_ttl
  2938. ``pillar_cache_ttl``
  2939. ********************
  2940. .. versionadded:: 2015.8.8
  2941. Default: ``3600``
  2942. If and only if a master has set ``pillar_cache: True``, the cache TTL controls the amount
  2943. of time, in seconds, before the cache is considered invalid by a master and a fresh
  2944. pillar is recompiled and stored.
  2945. .. conf_master:: pillar_cache_backend
  2946. ``pillar_cache_backend``
  2947. ************************
  2948. .. versionadded:: 2015.8.8
  2949. Default: ``disk``
  2950. If an only if a master has set ``pillar_cache: True``, one of several storage providers
  2951. can be utilized:
  2952. * ``disk`` (default):
  2953. The default storage backend. This caches rendered pillars to the master cache.
  2954. Rendered pillars are serialized and deserialized as ``msgpack`` structures for speed.
  2955. Note that pillars are stored UNENCRYPTED. Ensure that the master cache has permissions
  2956. set appropriately (sane defaults are provided).
  2957. * ``memory`` [EXPERIMENTAL]:
  2958. An optional backend for pillar caches which uses a pure-Python
  2959. in-memory data structure for maximal performance. There are several caveats,
  2960. however. First, because each master worker contains its own in-memory cache,
  2961. there is no guarantee of cache consistency between minion requests. This
  2962. works best in situations where the pillar rarely if ever changes. Secondly,
  2963. and perhaps more importantly, this means that unencrypted pillars will
  2964. be accessible to any process which can examine the memory of the ``salt-master``!
  2965. This may represent a substantial security risk.
  2966. .. code-block:: yaml
  2967. pillar_cache_backend: disk
  2968. Master Reactor Settings
  2969. =======================
  2970. .. conf_master:: reactor
  2971. ``reactor``
  2972. -----------
  2973. Default: ``[]``
  2974. Defines a salt reactor. See the :ref:`Reactor <reactor>` documentation for more
  2975. information.
  2976. .. code-block:: yaml
  2977. reactor:
  2978. - 'salt/minion/*/start':
  2979. - salt://reactor/startup_tasks.sls
  2980. .. conf_master:: reactor_refresh_interval
  2981. ``reactor_refresh_interval``
  2982. ----------------------------
  2983. Default: ``60``
  2984. The TTL for the cache of the reactor configuration.
  2985. .. code-block:: yaml
  2986. reactor_refresh_interval: 60
  2987. .. conf_master:: reactor_worker_threads
  2988. ``reactor_worker_threads``
  2989. --------------------------
  2990. Default: ``10``
  2991. The number of workers for the runner/wheel in the reactor.
  2992. .. code-block:: yaml
  2993. reactor_worker_threads: 10
  2994. .. conf_master:: reactor_worker_hwm
  2995. ``reactor_worker_hwm``
  2996. ----------------------
  2997. Default: ``10000``
  2998. The queue size for workers in the reactor.
  2999. .. code-block:: yaml
  3000. reactor_worker_hwm: 10000
  3001. .. _salt-api-master-settings:
  3002. Salt-API Master Settings
  3003. ========================
  3004. There are some settings for :ref:`salt-api <netapi-introduction>` that can be
  3005. configured on the Salt Master.
  3006. .. conf_master:: api_logfile
  3007. ``api_logfile``
  3008. ---------------
  3009. Default: ``/var/log/salt/api``
  3010. The logfile location for ``salt-api``.
  3011. .. code-block:: yaml
  3012. api_logfile: /var/log/salt/api
  3013. .. conf_master:: api_pidfile
  3014. ``api_pidfile``
  3015. ---------------
  3016. Default: /var/run/salt-api.pid
  3017. If this master will be running ``salt-api``, specify the pidfile of the
  3018. ``salt-api`` daemon.
  3019. .. code-block:: yaml
  3020. api_pidfile: /var/run/salt-api.pid
  3021. .. conf_master:: rest_timeout
  3022. ``rest_timeout``
  3023. ----------------
  3024. Default: ``300``
  3025. Used by ``salt-api`` for the master requests timeout.
  3026. .. code-block:: yaml
  3027. rest_timeout: 300
  3028. .. _syndic-server-settings:
  3029. Syndic Server Settings
  3030. ======================
  3031. A Salt syndic is a Salt master used to pass commands from a higher Salt master
  3032. to minions below the syndic. Using the syndic is simple. If this is a master
  3033. that will have syndic servers(s) below it, set the ``order_masters`` setting to
  3034. ``True``.
  3035. If this is a master that will be running a syndic daemon for passthrough the
  3036. ``syndic_master`` setting needs to be set to the location of the master server.
  3037. Do not forget that, in other words, it means that it shares with the local minion
  3038. its ID and PKI directory.
  3039. .. conf_master:: order_masters
  3040. ``order_masters``
  3041. -----------------
  3042. Default: ``False``
  3043. Extra data needs to be sent with publications if the master is controlling a
  3044. lower level master via a syndic minion. If this is the case the order_masters
  3045. value must be set to True
  3046. .. code-block:: yaml
  3047. order_masters: False
  3048. .. conf_master:: syndic_master
  3049. ``syndic_master``
  3050. -----------------
  3051. .. versionchanged:: 2016.3.5,2016.11.1
  3052. Set default higher level master address.
  3053. Default: ``masterofmasters``
  3054. If this master will be running the ``salt-syndic`` to connect to a higher level
  3055. master, specify the higher level master with this configuration value.
  3056. .. code-block:: yaml
  3057. syndic_master: masterofmasters
  3058. You can optionally connect a syndic to multiple higher level masters by
  3059. setting the ``syndic_master`` value to a list:
  3060. .. code-block:: yaml
  3061. syndic_master:
  3062. - masterofmasters1
  3063. - masterofmasters2
  3064. Each higher level master must be set up in a multi-master configuration.
  3065. .. conf_master:: syndic_master_port
  3066. ``syndic_master_port``
  3067. ----------------------
  3068. Default: ``4506``
  3069. If this master will be running the ``salt-syndic`` to connect to a higher level
  3070. master, specify the higher level master port with this configuration value.
  3071. .. code-block:: yaml
  3072. syndic_master_port: 4506
  3073. .. conf_master:: syndic_pidfile
  3074. ``syndic_pidfile``
  3075. ------------------
  3076. Default: ``/var/run/salt-syndic.pid``
  3077. If this master will be running the ``salt-syndic`` to connect to a higher level
  3078. master, specify the pidfile of the syndic daemon.
  3079. .. code-block:: yaml
  3080. syndic_pidfile: /var/run/syndic.pid
  3081. .. conf_master:: syndic_log_file
  3082. ``syndic_log_file``
  3083. -------------------
  3084. Default: ``/var/log/salt/syndic``
  3085. If this master will be running the ``salt-syndic`` to connect to a higher level
  3086. master, specify the log file of the syndic daemon.
  3087. .. code-block:: yaml
  3088. syndic_log_file: /var/log/salt-syndic.log
  3089. .. conf_master:: syndic_failover
  3090. ``syndic_failover``
  3091. -------------------
  3092. .. versionadded:: 2016.3.0
  3093. Default: ``random``
  3094. The behaviour of the multi-syndic when connection to a master of masters failed.
  3095. Can specify ``random`` (default) or ``ordered``. If set to ``random``, masters
  3096. will be iterated in random order. If ``ordered`` is specified, the configured
  3097. order will be used.
  3098. .. code-block:: yaml
  3099. syndic_failover: random
  3100. .. conf_master:: syndic_wait
  3101. ``syndic_wait``
  3102. ---------------
  3103. Default: ``5``
  3104. The number of seconds for the salt client to wait for additional syndics to
  3105. check in with their lists of expected minions before giving up.
  3106. .. code-block:: yaml
  3107. syndic_wait: 5
  3108. .. conf_master:: syndic_forward_all_events
  3109. ``syndic_forward_all_events``
  3110. -----------------------------
  3111. .. versionadded:: 2017.7.0
  3112. Default: ``False``
  3113. Option on multi-syndic or single when connected to multiple masters to be able to
  3114. send events to all connected masters.
  3115. .. code-block:: yaml
  3116. syndic_forward_all_events: False
  3117. .. _peer-publish-settings:
  3118. Peer Publish Settings
  3119. =====================
  3120. Salt minions can send commands to other minions, but only if the minion is
  3121. allowed to. By default "Peer Publication" is disabled, and when enabled it
  3122. is enabled for specific minions and specific commands. This allows secure
  3123. compartmentalization of commands based on individual minions.
  3124. .. conf_master:: peer
  3125. ``peer``
  3126. --------
  3127. Default: ``{}``
  3128. The configuration uses regular expressions to match minions and then a list
  3129. of regular expressions to match functions. The following will allow the
  3130. minion authenticated as foo.example.com to execute functions from the test
  3131. and pkg modules.
  3132. .. code-block:: yaml
  3133. peer:
  3134. foo.example.com:
  3135. - test.*
  3136. - pkg.*
  3137. This will allow all minions to execute all commands:
  3138. .. code-block:: yaml
  3139. peer:
  3140. .*:
  3141. - .*
  3142. This is not recommended, since it would allow anyone who gets root on any
  3143. single minion to instantly have root on all of the minions!
  3144. By adding an additional layer you can limit the target hosts in addition to the
  3145. accessible commands:
  3146. .. code-block:: yaml
  3147. peer:
  3148. foo.example.com:
  3149. 'db*':
  3150. - test.*
  3151. - pkg.*
  3152. .. conf_master:: peer_run
  3153. ``peer_run``
  3154. ------------
  3155. Default: ``{}``
  3156. The peer_run option is used to open up runners on the master to access from the
  3157. minions. The peer_run configuration matches the format of the peer
  3158. configuration.
  3159. The following example would allow foo.example.com to execute the manage.up
  3160. runner:
  3161. .. code-block:: yaml
  3162. peer_run:
  3163. foo.example.com:
  3164. - manage.up
  3165. .. _master-logging-settings:
  3166. Master Logging Settings
  3167. =======================
  3168. .. conf_master:: log_file
  3169. ``log_file``
  3170. ------------
  3171. Default: ``/var/log/salt/master``
  3172. The master log can be sent to a regular file, local path name, or network
  3173. location. See also :conf_log:`log_file`.
  3174. Examples:
  3175. .. code-block:: yaml
  3176. log_file: /var/log/salt/master
  3177. .. code-block:: yaml
  3178. log_file: file:///dev/log
  3179. .. code-block:: yaml
  3180. log_file: udp://loghost:10514
  3181. .. conf_master:: log_level
  3182. ``log_level``
  3183. -------------
  3184. Default: ``warning``
  3185. The level of messages to send to the console. See also :conf_log:`log_level`.
  3186. .. code-block:: yaml
  3187. log_level: warning
  3188. .. conf_master:: log_level_logfile
  3189. ``log_level_logfile``
  3190. ---------------------
  3191. Default: ``warning``
  3192. The level of messages to send to the log file. See also
  3193. :conf_log:`log_level_logfile`. When it is not set explicitly
  3194. it will inherit the level set by :conf_log:`log_level` option.
  3195. .. code-block:: yaml
  3196. log_level_logfile: warning
  3197. .. conf_master:: log_datefmt
  3198. ``log_datefmt``
  3199. ---------------
  3200. Default: ``%H:%M:%S``
  3201. The date and time format used in console log messages. See also
  3202. :conf_log:`log_datefmt`.
  3203. .. code-block:: yaml
  3204. log_datefmt: '%H:%M:%S'
  3205. .. conf_master:: log_datefmt_logfile
  3206. ``log_datefmt_logfile``
  3207. -----------------------
  3208. Default: ``%Y-%m-%d %H:%M:%S``
  3209. The date and time format used in log file messages. See also
  3210. :conf_log:`log_datefmt_logfile`.
  3211. .. code-block:: yaml
  3212. log_datefmt_logfile: '%Y-%m-%d %H:%M:%S'
  3213. .. conf_master:: log_fmt_console
  3214. ``log_fmt_console``
  3215. -------------------
  3216. Default: ``[%(levelname)-8s] %(message)s``
  3217. The format of the console logging messages. See also
  3218. :conf_log:`log_fmt_console`.
  3219. .. note::
  3220. Log colors are enabled in ``log_fmt_console`` rather than the
  3221. :conf_master:`color` config since the logging system is loaded before the
  3222. master config.
  3223. Console log colors are specified by these additional formatters:
  3224. %(colorlevel)s
  3225. %(colorname)s
  3226. %(colorprocess)s
  3227. %(colormsg)s
  3228. Since it is desirable to include the surrounding brackets, '[' and ']', in
  3229. the coloring of the messages, these color formatters also include padding
  3230. as well. Color LogRecord attributes are only available for console
  3231. logging.
  3232. .. code-block:: yaml
  3233. log_fmt_console: '%(colorlevel)s %(colormsg)s'
  3234. log_fmt_console: '[%(levelname)-8s] %(message)s'
  3235. .. conf_master:: log_fmt_logfile
  3236. ``log_fmt_logfile``
  3237. -------------------
  3238. Default: ``%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s``
  3239. The format of the log file logging messages. See also
  3240. :conf_log:`log_fmt_logfile`.
  3241. .. code-block:: yaml
  3242. log_fmt_logfile: '%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s'
  3243. .. conf_master:: log_granular_levels
  3244. ``log_granular_levels``
  3245. -----------------------
  3246. Default: ``{}``
  3247. This can be used to control logging levels more specifically. See also
  3248. :conf_log:`log_granular_levels`.
  3249. .. conf_master:: log_rotate_max_bytes
  3250. ``log_rotate_max_bytes``
  3251. ------------------------
  3252. Default: ``0``
  3253. The maximum number of bytes a single log file may contain before it is rotated.
  3254. A value of 0 disables this feature. Currently only supported on Windows. On
  3255. other platforms, use an external tool such as 'logrotate' to manage log files.
  3256. :conf_log:`log_rotate_max_bytes`
  3257. .. conf_master:: log_rotate_backup_count
  3258. ``log_rotate_backup_count``
  3259. ---------------------------
  3260. Default: ``0``
  3261. The number of backup files to keep when rotating log files. Only used if
  3262. :conf_master:`log_rotate_max_bytes` is greater than 0. Currently only supported
  3263. on Windows. On other platforms, use an external tool such as 'logrotate' to
  3264. manage log files.
  3265. :conf_log:`log_rotate_backup_count`
  3266. .. _node-groups:
  3267. Node Groups
  3268. ===========
  3269. .. conf_master:: nodegroups
  3270. ``nodegroups``
  3271. --------------
  3272. Default: ``{}``
  3273. Node groups allow for logical groupings of minion nodes.
  3274. A group consists of a group name and a compound target.
  3275. .. code-block:: yaml
  3276. nodegroups:
  3277. group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com or bl*.domain.com'
  3278. group2: 'G@os:Debian and foo.domain.com'
  3279. group3: 'G@os:Debian and N@group1'
  3280. group4:
  3281. - 'G@foo:bar'
  3282. - 'or'
  3283. - 'G@foo:baz'
  3284. More information on using nodegroups can be found :ref:`here <targeting-nodegroups>`.
  3285. .. _range-cluster-settings:
  3286. Range Cluster Settings
  3287. ======================
  3288. .. conf_master:: range_server
  3289. ``range_server``
  3290. ----------------
  3291. Default: ``'range:80'``
  3292. The range server (and optional port) that serves your cluster information
  3293. https://github.com/ytoolshed/range/wiki/%22yamlfile%22-module-file-spec
  3294. .. code-block:: yaml
  3295. range_server: range:80
  3296. .. _include-configuration:
  3297. Include Configuration
  3298. =====================
  3299. Configuration can be loaded from multiple files. The order in which this is
  3300. done is:
  3301. 1. The master config file itself
  3302. 2. The files matching the glob in :conf_master:`default_include`
  3303. 3. The files matching the glob in :conf_master:`include` (if defined)
  3304. Each successive step overrides any values defined in the previous steps.
  3305. Therefore, any config options defined in one of the
  3306. :conf_master:`default_include` files would override the same value in the
  3307. master config file, and any options defined in :conf_master:`include` would
  3308. override both.
  3309. .. conf_master:: default_include
  3310. ``default_include``
  3311. -------------------
  3312. Default: ``master.d/*.conf``
  3313. The master can include configuration from other files. Per default the
  3314. master will automatically include all config files from ``master.d/*.conf``
  3315. where ``master.d`` is relative to the directory of the master configuration
  3316. file.
  3317. .. note::
  3318. Salt creates files in the ``master.d`` directory for its own use. These
  3319. files are prefixed with an underscore. A common example of this is the
  3320. ``_schedule.conf`` file.
  3321. .. conf_master:: include
  3322. ``include``
  3323. -----------
  3324. Default: ``not defined``
  3325. The master can include configuration from other files. To enable this,
  3326. pass a list of paths to this option. The paths can be either relative or
  3327. absolute; if relative, they are considered to be relative to the directory
  3328. the main minion configuration file lives in. Paths can make use of
  3329. shell-style globbing. If no files are matched by a path passed to this
  3330. option then the master will log a warning message.
  3331. .. code-block:: yaml
  3332. # Include files from a master.d directory in the same
  3333. # directory as the master config file
  3334. include: master.d/*
  3335. # Include a single extra file into the configuration
  3336. include: /etc/roles/webserver
  3337. # Include several files and the master.d directory
  3338. include:
  3339. - extra_config
  3340. - master.d/*
  3341. - /etc/roles/webserver
  3342. Keepalive Settings
  3343. ==================
  3344. .. conf_master:: tcp_keepalive
  3345. ``tcp_keepalive``
  3346. -----------------
  3347. Default: ``True``
  3348. The tcp keepalive interval to set on TCP ports. This setting can be used to tune Salt
  3349. connectivity issues in messy network environments with misbehaving firewalls.
  3350. .. code-block:: yaml
  3351. tcp_keepalive: True
  3352. .. conf_master:: tcp_keepalive_cnt
  3353. ``tcp_keepalive_cnt``
  3354. ---------------------
  3355. Default: ``-1``
  3356. Sets the ZeroMQ TCP keepalive count. May be used to tune issues with minion disconnects.
  3357. .. code-block:: yaml
  3358. tcp_keepalive_cnt: -1
  3359. .. conf_master:: tcp_keepalive_idle
  3360. ``tcp_keepalive_idle``
  3361. ----------------------
  3362. Default: ``300``
  3363. Sets ZeroMQ TCP keepalive idle. May be used to tune issues with minion disconnects.
  3364. .. code-block:: yaml
  3365. tcp_keepalive_idle: 300
  3366. .. conf_master:: tcp_keepalive_intvl
  3367. ``tcp_keepalive_intvl``
  3368. -----------------------
  3369. Default: ``-1``
  3370. Sets ZeroMQ TCP keepalive interval. May be used to tune issues with minion disconnects.
  3371. .. code-block:: yaml
  3372. tcp_keepalive_intvl': -1
  3373. .. _winrepo-master-config-opts:
  3374. Windows Software Repo Settings
  3375. ==============================
  3376. .. conf_master:: winrepo_provider
  3377. ``winrepo_provider``
  3378. --------------------
  3379. .. versionadded:: 2015.8.0
  3380. Specify the provider to be used for winrepo. Must be either ``pygit2`` or
  3381. ``gitpython``. If unset, then both will be tried in that same order, and the
  3382. first one with a compatible version installed will be the provider that is
  3383. used.
  3384. .. code-block:: yaml
  3385. winrepo_provider: gitpython
  3386. .. conf_master:: winrepo_dir
  3387. .. conf_master:: win_repo
  3388. ``winrepo_dir``
  3389. ---------------
  3390. .. versionchanged:: 2015.8.0
  3391. Renamed from ``win_repo`` to ``winrepo_dir``.
  3392. Default: ``/srv/salt/win/repo``
  3393. Location on the master where the :conf_master:`winrepo_remotes` are checked out
  3394. for pre-2015.8.0 minions. 2015.8.0 and later minions use
  3395. :conf_master:`winrepo_remotes_ng <winrepo_remotes_ng>` instead.
  3396. .. code-block:: yaml
  3397. winrepo_dir: /srv/salt/win/repo
  3398. .. conf_master:: winrepo_dir_ng
  3399. ``winrepo_dir_ng``
  3400. ------------------
  3401. .. versionadded:: 2015.8.0
  3402. A new :ref:`ng <windows-package-manager>` repo was added.
  3403. Default: ``/srv/salt/win/repo-ng``
  3404. Location on the master where the :conf_master:`winrepo_remotes_ng` are checked
  3405. out for 2015.8.0 and later minions.
  3406. .. code-block:: yaml
  3407. winrepo_dir_ng: /srv/salt/win/repo-ng
  3408. .. conf_master:: winrepo_cachefile
  3409. .. conf_master:: win_repo_mastercachefile
  3410. ``winrepo_cachefile``
  3411. ---------------------
  3412. .. versionchanged:: 2015.8.0
  3413. Renamed from ``win_repo_mastercachefile`` to ``winrepo_cachefile``
  3414. .. note::
  3415. 2015.8.0 and later minions do not use this setting since the cachefile
  3416. is now generated by the minion.
  3417. Default: ``winrepo.p``
  3418. Path relative to :conf_master:`winrepo_dir` where the winrepo cache should be
  3419. created.
  3420. .. code-block:: yaml
  3421. winrepo_cachefile: winrepo.p
  3422. .. conf_master:: winrepo_remotes
  3423. .. conf_master:: win_gitrepos
  3424. ``winrepo_remotes``
  3425. -------------------
  3426. .. versionchanged:: 2015.8.0
  3427. Renamed from ``win_gitrepos`` to ``winrepo_remotes``.
  3428. Default: ``['https://github.com/saltstack/salt-winrepo.git']``
  3429. List of git repositories to checkout and include in the winrepo for
  3430. pre-2015.8.0 minions. 2015.8.0 and later minions use
  3431. :conf_master:`winrepo_remotes_ng <winrepo_remotes_ng>` instead.
  3432. .. code-block:: yaml
  3433. winrepo_remotes:
  3434. - https://github.com/saltstack/salt-winrepo.git
  3435. To specify a specific revision of the repository, prepend a commit ID to the
  3436. URL of the repository:
  3437. .. code-block:: yaml
  3438. winrepo_remotes:
  3439. - '<commit_id> https://github.com/saltstack/salt-winrepo.git'
  3440. Replace ``<commit_id>`` with the SHA1 hash of a commit ID. Specifying a commit
  3441. ID is useful in that it allows one to revert back to a previous version in the
  3442. event that an error is introduced in the latest revision of the repo.
  3443. .. conf_master:: winrepo_remotes_ng
  3444. ``winrepo_remotes_ng``
  3445. ----------------------
  3446. .. versionadded:: 2015.8.0
  3447. A new :ref:`ng <windows-package-manager>` repo was added.
  3448. Default: ``['https://github.com/saltstack/salt-winrepo-ng.git']``
  3449. List of git repositories to checkout and include in the winrepo for
  3450. 2015.8.0 and later minions.
  3451. .. code-block:: yaml
  3452. winrepo_remotes_ng:
  3453. - https://github.com/saltstack/salt-winrepo-ng.git
  3454. To specify a specific revision of the repository, prepend a commit ID to the
  3455. URL of the repository:
  3456. .. code-block:: yaml
  3457. winrepo_remotes_ng:
  3458. - '<commit_id> https://github.com/saltstack/salt-winrepo-ng.git'
  3459. Replace ``<commit_id>`` with the SHA1 hash of a commit ID. Specifying a commit
  3460. ID is useful in that it allows one to revert back to a previous version in the
  3461. event that an error is introduced in the latest revision of the repo.
  3462. .. conf_master:: winrepo_branch
  3463. ``winrepo_branch``
  3464. ------------------
  3465. .. versionadded:: 2015.8.0
  3466. Default: ``master``
  3467. If the branch is omitted from a winrepo remote, then this branch will be
  3468. used instead. For example, in the configuration below, the first two remotes
  3469. would use the ``winrepo`` branch/tag, while the third would use the ``foo``
  3470. branch/tag.
  3471. .. code-block:: yaml
  3472. winrepo_branch: winrepo
  3473. winrepo_remotes:
  3474. - https://mygitserver/winrepo1.git
  3475. - https://mygitserver/winrepo2.git:
  3476. - foo https://mygitserver/winrepo3.git
  3477. .. conf_master:: winrepo_ssl_verify
  3478. ``winrepo_ssl_verify``
  3479. ----------------------
  3480. .. versionadded:: 2015.8.0
  3481. .. versionchanged:: 2016.11.0
  3482. Default: ``False``
  3483. Specifies whether or not to ignore SSL certificate errors when contacting the
  3484. remote repository. The ``False`` setting is useful if you're using a
  3485. git repo that uses a self-signed certificate. However, keep in mind that
  3486. setting this to anything other ``True`` is a considered insecure, and using an
  3487. SSH-based transport (if available) may be a better option.
  3488. In the 2016.11.0 release, the default config value changed from ``False`` to
  3489. ``True``.
  3490. .. code-block:: yaml
  3491. winrepo_ssl_verify: True
  3492. Winrepo Authentication Options
  3493. ------------------------------
  3494. These parameters only currently apply to the ``pygit2``
  3495. :conf_master:`winrepo_provider`. Authentication works the same as it does in
  3496. gitfs, as outlined in the :ref:`GitFS Walkthrough <gitfs-authentication>`,
  3497. though the global configuration options are named differently to reflect that
  3498. they are for winrepo instead of gitfs.
  3499. .. conf_master:: winrepo_user
  3500. ``winrepo_user``
  3501. ****************
  3502. .. versionadded:: 2015.8.0
  3503. Default: ``''``
  3504. Along with :conf_master:`winrepo_password`, is used to authenticate to HTTPS
  3505. remotes.
  3506. .. code-block:: yaml
  3507. winrepo_user: git
  3508. .. conf_master:: winrepo_password
  3509. ``winrepo_password``
  3510. ********************
  3511. .. versionadded:: 2015.8.0
  3512. Default: ``''``
  3513. Along with :conf_master:`winrepo_user`, is used to authenticate to HTTPS
  3514. remotes. This parameter is not required if the repository does not use
  3515. authentication.
  3516. .. code-block:: yaml
  3517. winrepo_password: mypassword
  3518. .. conf_master:: winrepo_insecure_auth
  3519. ``winrepo_insecure_auth``
  3520. *************************
  3521. .. versionadded:: 2015.8.0
  3522. Default: ``False``
  3523. By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
  3524. parameter enables authentication over HTTP. **Enable this at your own risk.**
  3525. .. code-block:: yaml
  3526. winrepo_insecure_auth: True
  3527. .. conf_master:: winrepo_pubkey
  3528. ``winrepo_pubkey``
  3529. ******************
  3530. .. versionadded:: 2015.8.0
  3531. Default: ``''``
  3532. Along with :conf_master:`winrepo_privkey` (and optionally
  3533. :conf_master:`winrepo_passphrase`), is used to authenticate to SSH remotes.
  3534. .. code-block:: yaml
  3535. winrepo_pubkey: /path/to/key.pub
  3536. .. conf_master:: winrepo_privkey
  3537. ``winrepo_privkey``
  3538. *******************
  3539. .. versionadded:: 2015.8.0
  3540. Default: ``''``
  3541. Along with :conf_master:`winrepo_pubkey` (and optionally
  3542. :conf_master:`winrepo_passphrase`), is used to authenticate to SSH remotes.
  3543. .. code-block:: yaml
  3544. winrepo_privkey: /path/to/key
  3545. .. conf_master:: winrepo_passphrase
  3546. ``winrepo_passphrase``
  3547. **********************
  3548. .. versionadded:: 2015.8.0
  3549. Default: ``''``
  3550. This parameter is optional, required only when the SSH key being used to
  3551. authenticate is protected by a passphrase.
  3552. .. code-block:: yaml
  3553. winrepo_passphrase: mypassphrase
  3554. .. conf_master:: winrepo_refspecs
  3555. ``winrepo_refspecs``
  3556. ~~~~~~~~~~~~~~~~~~~~
  3557. .. versionadded:: 2017.7.0
  3558. Default: ``['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*']``
  3559. When fetching from remote repositories, by default Salt will fetch branches and
  3560. tags. This parameter can be used to override the default and specify
  3561. alternate refspecs to be fetched. This parameter works similarly to its
  3562. :ref:`GitFS counterpart <gitfs-custom-refspecs>`, in that it can be
  3563. configured both globally and for individual remotes.
  3564. .. code-block:: yaml
  3565. winrepo_refspecs:
  3566. - '+refs/heads/*:refs/remotes/origin/*'
  3567. - '+refs/tags/*:refs/tags/*'
  3568. - '+refs/pull/*/head:refs/remotes/origin/pr/*'
  3569. - '+refs/pull/*/merge:refs/remotes/origin/merge/*'
  3570. .. _configure-master-on-windows:
  3571. Configure Master on Windows
  3572. ===========================
  3573. The master on Windows requires no additional configuration. You can modify the
  3574. master configuration by creating/editing the master config file located at
  3575. ``c:\salt\conf\master``. The same configuration options available on Linux are
  3576. available in Windows, as long as they apply. For example, SSH options wouldn't
  3577. apply in Windows. The main differences are the file paths. If you are familiar
  3578. with common salt paths, the following table may be useful:
  3579. ============= ========= =================
  3580. linux Paths Windows Paths
  3581. ============= ========= =================
  3582. ``/etc/salt`` ``<--->`` ``c:\salt\conf``
  3583. ``/`` ``<--->`` ``c:\salt``
  3584. ============= ========= =================
  3585. So, for example, the master config file in Linux is ``/etc/salt/master``. In
  3586. Windows the master config file is ``c:\salt\conf\master``. The Linux path
  3587. ``/etc/salt`` becomes ``c:\salt\conf`` in Windows.
  3588. Common File Locations
  3589. ---------------------
  3590. ====================================== =============================================
  3591. Linux Paths Windows Paths
  3592. ====================================== =============================================
  3593. ``conf_file: /etc/salt/master`` ``conf_file: c:\salt\conf\master``
  3594. ``log_file: /var/log/salt/master`` ``log_file: c:\salt\var\log\salt\master``
  3595. ``pidfile: /var/run/salt-master.pid`` ``pidfile: c:\salt\var\run\salt-master.pid``
  3596. ====================================== =============================================
  3597. Common Directories
  3598. ------------------
  3599. ====================================================== ============================================
  3600. Linux Paths Windows Paths
  3601. ====================================================== ============================================
  3602. ``cachedir: /var/cache/salt/master`` ``cachedir: c:\salt\var\cache\salt\master``
  3603. ``extension_modules: /var/cache/salt/master/extmods`` ``c:\salt\var\cache\salt\master\extmods``
  3604. ``pki_dir: /etc/salt/pki/master`` ``pki_dir: c:\salt\conf\pki\master``
  3605. ``root_dir: /`` ``root_dir: c:\salt``
  3606. ``sock_dir: /var/run/salt/master`` ``sock_dir: c:\salt\var\run\salt\master``
  3607. ====================================================== ============================================
  3608. Roots
  3609. -----
  3610. **file_roots**
  3611. ================== =========================
  3612. Linux Paths Windows Paths
  3613. ================== =========================
  3614. ``/srv/salt`` ``c:\salt\srv\salt``
  3615. ``/srv/spm/salt`` ``c:\salt\srv\spm\salt``
  3616. ================== =========================
  3617. **pillar_roots**
  3618. ==================== ===========================
  3619. Linux Paths Windows Paths
  3620. ==================== ===========================
  3621. ``/srv/pillar`` ``c:\salt\srv\pillar``
  3622. ``/srv/spm/pillar`` ``c:\salt\srv\spm\pillar``
  3623. ==================== ===========================
  3624. Win Repo Settings
  3625. -----------------
  3626. ========================================== =================================================
  3627. Linux Paths Windows Paths
  3628. ========================================== =================================================
  3629. ``winrepo_dir: /srv/salt/win/repo`` ``winrepo_dir: c:\salt\srv\salt\win\repo``
  3630. ``winrepo_dir_ng: /srv/salt/win/repo-ng`` ``winrepo_dir_ng: c:\salt\srv\salt\win\repo-ng``
  3631. ========================================== =================================================