Mohamed Lrhazi
2011-Nov-21 02:05 UTC
[Puppet Users] Puppet Windows: Should I use dedicated "environment" ?
I stated tweaking my puppet modules and site.pp to support the new OS.. things like: if ( $operatingsystem == "windows" ) { Exec { path => "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin" } } else { And now am thinking, would be better to just have an independent "environment" for all my Windows clients? what would be the draw backs of that? Thanks a lot, Mohamed. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Evan Hisey
2011-Nov-21 18:11 UTC
Re: [Puppet Users] Puppet Windows: Should I use dedicated "environment" ?
On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> I stated tweaking my puppet modules and site.pp to support the new > OS.. things like: > > if ( $operatingsystem == "windows" ) { > Exec { path => > "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin" > } > } else { > > And now am thinking, would be better to just have an independent > "environment" for all my Windows clients? what would be the draw backs > of that? > > Thanks a lot, > Mohamed. >I use multiple environments for separating development and production systems. The only really draw back I encounter is the need to make the same change twice for certain things that are shared between both environments. I ma sure there is wa way around that, but it has not become enough of an issue to make me find it. evan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Aaron Grewell
2011-Nov-21 18:26 UTC
Re: [Puppet Users] Puppet Windows: Should I use dedicated "environment" ?
Another way to handle this is to have class-level logic: class something { if ( $operatingsystem == "windows" ) { include something::windows } if ( $operatingsystem == "redhat" ) { include something::redhat } } Then put your resources in something::windows, something::redhat, etc. You may duplicate some code this way, but when the OS''es are very different you''ll ultimately save coding time and increase readability by avoiding resource-level logic. On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey <ehisey@gmail.com> wrote:> On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: >> I stated tweaking my puppet modules and site.pp to support the new >> OS.. things like: >> >> if ( $operatingsystem == "windows" ) { >> Exec { path => >> "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin" >> } >> } else { >> >> And now am thinking, would be better to just have an independent >> "environment" for all my Windows clients? what would be the draw backs >> of that? >> >> Thanks a lot, >> Mohamed. >> > > I use multiple environments for separating development and production > systems. The only really draw back I encounter is the need to make the > same change twice for certain things that are shared between both > environments. I ma sure there is wa way around that, but it has not > become enough of an issue to make me find it. > > evan > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Mohamed Lrhazi
2011-Nov-21 19:31 UTC
Re: [Puppet Users] Puppet Windows: Should I use dedicated "environment" ?
Thanks guys. We do use environments already, and we also do use this pattern for separating operating system specific details to sub classes... but we only had to deal with Red Hat/CentOS/Oracle Enterprise Linux, and Solaris.... I guess I was thinking that "windows" is so different that it should be totally separate :) Thanks. Mohamed. On Mon, Nov 21, 2011 at 1:26 PM, Aaron Grewell <aaron.grewell@gmail.com> wrote:> Another way to handle this is to have class-level logic: > class something { > if ( $operatingsystem == "windows" ) { include something::windows } > if ( $operatingsystem == "redhat" ) { include something::redhat } > } > > Then put your resources in something::windows, something::redhat, etc. > You may duplicate some code this way, but when the OS''es are very > different you''ll ultimately save coding time and increase readability > by avoiding resource-level logic. > > On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey <ehisey@gmail.com> wrote: >> On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: >>> I stated tweaking my puppet modules and site.pp to support the new >>> OS.. things like: >>> >>> if ( $operatingsystem == "windows" ) { >>> Exec { path => >>> "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin" >>> } >>> } else { >>> >>> And now am thinking, would be better to just have an independent >>> "environment" for all my Windows clients? what would be the draw backs >>> of that? >>> >>> Thanks a lot, >>> Mohamed. >>> >> >> I use multiple environments for separating development and production >> systems. The only really draw back I encounter is the need to make the >> same change twice for certain things that are shared between both >> environments. I ma sure there is wa way around that, but it has not >> become enough of an issue to make me find it. >> >> evan >> >> -- >> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Aaron Grewell
2011-Nov-21 19:40 UTC
Re: [Puppet Users] Puppet Windows: Should I use dedicated "environment" ?
I wouldn''t expect a lot of class overlap, so it might be simpler to do it that way, but it also means a completely different directory tree. It''s going to come down to the personal taste of the admins I expect. On Mon, Nov 21, 2011 at 11:31 AM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> Thanks guys. We do use environments already, and we also do use this > pattern for separating operating system specific details to sub > classes... but we only had to deal with Red Hat/CentOS/Oracle > Enterprise Linux, and Solaris.... > > I guess I was thinking that "windows" is so different that it should > be totally separate :) > > Thanks. > Mohamed. > > On Mon, Nov 21, 2011 at 1:26 PM, Aaron Grewell <aaron.grewell@gmail.com> wrote: >> Another way to handle this is to have class-level logic: >> class something { >> if ( $operatingsystem == "windows" ) { include something::windows } >> if ( $operatingsystem == "redhat" ) { include something::redhat } >> } >> >> Then put your resources in something::windows, something::redhat, etc. >> You may duplicate some code this way, but when the OS''es are very >> different you''ll ultimately save coding time and increase readability >> by avoiding resource-level logic. >> >> On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey <ehisey@gmail.com> wrote: >>> On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: >>>> I stated tweaking my puppet modules and site.pp to support the new >>>> OS.. things like: >>>> >>>> if ( $operatingsystem == "windows" ) { >>>> Exec { path => >>>> "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin" >>>> } >>>> } else { >>>> >>>> And now am thinking, would be better to just have an independent >>>> "environment" for all my Windows clients? what would be the draw backs >>>> of that? >>>> >>>> Thanks a lot, >>>> Mohamed. >>>> >>> >>> I use multiple environments for separating development and production >>> systems. The only really draw back I encounter is the need to make the >>> same change twice for certain things that are shared between both >>> environments. I ma sure there is wa way around that, but it has not >>> become enough of an issue to make me find it. >>> >>> evan >>> >>> -- >>> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >>> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.