[{"data":1,"prerenderedAt":393},["ShallowReactive",2],{"Categories":3,"NavIndexCategoriesCountFooter":203,"content-\u002F2014\u002F05\u002F26\u002Fpuppet-3-6-1-deprecation-environments\u002F":204},[4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202],{"category":5},"System Administration",{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},"Software Development",{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":27},{"category":27},{"category":67},"Drones & RC",{"category":69},"DIY Projects",{"category":67},{"category":72},"Photography",{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":67},{"category":67},{"category":72},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":5},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":67},{"category":67},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":72},{"category":67},{"category":138},"3D Printing - Laser Cutting - CNC",{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":5},{"category":138},{"category":27},{"category":27},{"category":138},{"category":138},{"category":72},{"category":158},"Photography,3D Printing - Laser Cutting - CNC",{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":67},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":181},"Home Assistant",{"category":181},{"category":72},{"category":27},{"category":27},{"category":72},{"category":138},{"category":5},{"category":72},{"category":72},{"category":138},{"category":27},{"category":181},{"category":181},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},191,{"id":205,"title":206,"body":207,"category":379,"date":380,"description":213,"embedImage":379,"extension":381,"image":379,"intro":382,"meta":383,"navigation":384,"path":385,"seo":386,"series":379,"sitemap":387,"stem":388,"tags":389,"__hash__":392},"content\u002F2014\u002F05\u002F26\u002Fpuppet-3-6-1-deprecation-environments.md","Puppet 3.6.1 - deprecation: environments",{"type":208,"value":209,"toc":377},"minimark",[210,214,217,228,231,245,255,264,272,275,278,281,295,298,367,370,373],[211,212,213],"p",{},"This weekend I updated puppet (master and agent) from 3.6.0 to 3.6.1 (this is on debian using the apt.puppetlabs.com repository).",[211,215,216],{},"This filled my logs with the following error:",[218,219,224],"pre",{"className":220,"code":222,"language":223},[221],"language-text","puppet-master[26558]: no 'environments' in {:current_environment=>*root*, :root_environment=>*root*} at top of [[0, nil, nil]]\n","text",[225,226,222],"code",{"__ignoreMap":227},"",[211,229,230],{},"So - something in a point release broke.",[211,232,233,234,244],{},"Some digging leads to ",[235,236,243],"a",{"href":237,"rel":238,"target":242},"http:\u002F\u002Fdocs.puppetlabs.com\u002Fpuppet\u002Flatest\u002Freference\u002Fenvironments.html",[239,240,241],"nofollow","noopener","noreferer","_blank","directory environments",". Here we can learn that directory environments:",[246,247,248,252],"ul",{},[249,250,251],"li",{},"override config file environments",[249,253,254],{},"can be enabled in some specific ways",[211,256,257,258,263],{},"And in the ",[235,259,262],{"href":260,"rel":261,"target":242},"http:\u002F\u002Fdocs.puppetlabs.com\u002Fpuppet\u002Flatest\u002Freference\u002Frelease_notes.html#deprecation-config-file-environments-and-the-global-manifestmodulepathconfigversion-settings",[239,240,241],"release notes"," we can see that it will also mean:",[246,265,266,269],{},[249,267,268],{},"using no environments is deprecated",[249,270,271],{},"\"In a future version of Puppet (probably Puppet 4), directory environments will always be enabled\"",[211,273,274],{},"Now - I have not enabled environments - so it looks like 3.6.1 on debian at least this last point has already happened (could be a bug, could be just me - no idea).",[211,276,277],{},"Now - I have a really really simple network to manage - a puppet master who is also an agent - and a second agent. That's it right now. So - how to simply get back to running a single production environment?",[211,279,280],{},"The simplest I have found is the following.",[282,283,284,292],"ol",{},[249,285,286,287,291],{},"create the directory ",[288,289,290],"em",{},"environments\u002Fproduction"," under puppet (default \u002Fetc\u002Fpuppet)",[249,293,294],{},"create an environment.conf file pointing back to the original locations",[211,296,297],{},"My environment.conf looks like",[218,299,303],{"className":300,"code":301,"language":302,"meta":227,"style":227},"language-ruby shiki shiki-themes github-dark","manifest = $confdir\u002Fmanifests\u002Fsite.pp\nmanifestdir = $confdir\u002Fmanifests\nmodulepath = $confdir\u002Fmodules\n","ruby",[225,304,305,337,352],{"__ignoreMap":227},[306,307,310,314,318,322,325,328,330,333],"span",{"class":308,"line":309},"line",1,[306,311,313],{"class":312},"s9osk","manifest",[306,315,317],{"class":316},"snl16"," =",[306,319,321],{"class":320},"s95oV"," $confdir",[306,323,324],{"class":316},"\u002F",[306,326,327],{"class":320},"manifests",[306,329,324],{"class":316},[306,331,332],{"class":320},"site.",[306,334,336],{"class":335},"svObZ","pp\n",[306,338,340,343,345,347,349],{"class":308,"line":339},2,[306,341,342],{"class":312},"manifestdir",[306,344,317],{"class":316},[306,346,321],{"class":320},[306,348,324],{"class":316},[306,350,351],{"class":320},"manifests\n",[306,353,355,358,360,362,364],{"class":308,"line":354},3,[306,356,357],{"class":312},"modulepath",[306,359,317],{"class":316},[306,361,321],{"class":320},[306,363,324],{"class":316},[306,365,366],{"class":320},"modules\n",[211,368,369],{},"Now at least I'm back with a running master\u002Fagent. Maybe I should look into using the environments\u002Fproduction directory properly - but at 6am on a monday morning I needed a quick fix ;)",[211,371,372],{},"Next issue - how to handle the deprecation of import (which I use in one file - the main site.pp to bring in config from nodes.pp and then for each site). But that's only giving deprecation warnings so I have a little time.",[374,375,376],"style",{},"html pre.shiki code .s9osk, html code.shiki .s9osk{--shiki-default:#FFAB70}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":227,"searchDepth":339,"depth":339,"links":378},[],null,"2014-05-26 08:18 +0200","md","Dealing with deprecations when migrating from puppet 3.6.0 to 3.6.1",{},true,"\u002F2014\u002F05\u002F26\u002Fpuppet-3-6-1-deprecation-environments",{"title":206,"description":213},{"loc":385},"2014\u002F05\u002F26\u002Fpuppet-3-6-1-deprecation-environments",[390,391],"puppet","debian","XxPPjHUZpkJAsVYbOPmAklGuWNc7FyoHTAtPri-wkX0",1775293010956]