master.rst 137 KB

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