master.rst 138 KB

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