master.rst 141 KB

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