Hi, I''d like to start using Puppet to manage an httpd.conf file across several webservers. I have a Puppet server and client config setup and have followed a couple of simple "How To''s" to get off the ground. I''m syncing a couple of files and ensuring certain packages are installed etc on the client. Now, here ''s where I''m stuck... what happens if the httpd.conf file is slightly different on each webserver? For example, each httpd.conf file has multiple Virtual Host entries that are defined by the webservers IP. <VirtualHost 10.3.200.131:80> for example. How do I manage one httpd.conf file from the Puppet server given the VirtualHost IP''s will be different on each server? I guess I just want to "taylor" the http.conf file for each weberserver but manage it from the Puppet Server. If anyone can give me a few pointers it would be appreciated. Thanks, -- 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.
Michael Stahnke
2012-Feb-09 01:56 UTC
Re: [Puppet Users] Questions regarding Puppet with httpd.conf
On Wed, Feb 8, 2012 at 3:46 PM, the_fonz <tim_stockford@hotmail.com> wrote:> Hi, > > I''d like to start using Puppet to manage an httpd.conf file across > several webservers. I have a Puppet server and client config setup and > have followed a couple of simple "How To''s" to get off the ground. I''m > syncing a couple of files and ensuring certain packages are installed > etc on the client. > > Now, here ''s where I''m stuck... what happens if the httpd.conf file is > slightly different on each webserver? For example, each httpd.conf > file has multiple Virtual Host entries that are defined by the > webservers IP. <VirtualHost 10.3.200.131:80> for example.You''ll want to look at http://docs.puppetlabs.com/guides/templating.html You can use a template and have it fill in variables. Luckily, the host''s IP address is already available as a variable via facter.> > How do I manage one httpd.conf file from the Puppet server given the > VirtualHost IP''s will be different on each server? I guess I just want > to "taylor" the http.conf file for each weberserver but manage it from > the Puppet Server. > > If anyone can give me a few pointers it would be appreciated. > > Thanks, > > -- > 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.
Brian Gallew
2012-Feb-09 05:45 UTC
Re: [Puppet Users] Questions regarding Puppet with httpd.conf
Further, you should remember that there is no reason for an Apache configuration to be monolithic. Apache is perfectly happy to have a bunch of files to include. Throw in a naming convention (e.g. files named foo.ssl will be included by my SSL config file) and you''ve got some real flexibility. On Wed, Feb 8, 2012 at 5:56 PM, Michael Stahnke <stahnma@puppetlabs.com>wrote:> On Wed, Feb 8, 2012 at 3:46 PM, the_fonz <tim_stockford@hotmail.com> > wrote: > > Hi, > > > > I''d like to start using Puppet to manage an httpd.conf file across > > several webservers. I have a Puppet server and client config setup and > > have followed a couple of simple "How To''s" to get off the ground. I''m > > syncing a couple of files and ensuring certain packages are installed > > etc on the client. > > > > Now, here ''s where I''m stuck... what happens if the httpd.conf file is > > slightly different on each webserver? For example, each httpd.conf > > file has multiple Virtual Host entries that are defined by the > > webservers IP. <VirtualHost 10.3.200.131:80> for example. > > You''ll want to look at http://docs.puppetlabs.com/guides/templating.html > > You can use a template and have it fill in variables. Luckily, the > host''s IP address is already available as a variable via facter. > > > > > > How do I manage one httpd.conf file from the Puppet server given the > > VirtualHost IP''s will be different on each server? I guess I just want > > to "taylor" the http.conf file for each weberserver but manage it from > > the Puppet Server. > > > > If anyone can give me a few pointers it would be appreciated. > > > > Thanks, > > > > -- > > 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.
Russell Van Tassell
2012-Feb-09 21:34 UTC
Re: [Puppet Users] Questions regarding Puppet with httpd.conf
On Wed, Feb 8, 2012 at 3:46 PM, the_fonz <tim_stockford@hotmail.com> wrote:> Hi, > > I''d like to start using Puppet to manage an httpd.conf file across > several webservers.Others have already correctly steered you towards templates for this sort of thing, but I have one aside...> each httpd.conf > file has multiple Virtual Host entries that are defined by the > webservers IP. <VirtualHost 10.3.200.131:80> for example. >Just like to point out that, unless you have specific reason for binding apache only to one interface, it''s perfectly acceptable to throw wildcards in to these declarations (ie. software virtual hosting versus hardware). It has the added effect of simplifying configurations (though, as I hinted at previously, there may be other security related implications or similar that prevents you from doing this sort of thing). -- 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.
the_fonz
2012-Feb-10 09:44 UTC
[Puppet Users] Re: Questions regarding Puppet with httpd.conf
Thanks for the replies, they were very helpful. I''ll post back if I have any problems. On Feb 9, 5:45 am, Brian Gallew <g...@gallew.org> wrote:> Further, you should remember that there is no reason for an Apache > configuration to be monolithic. Apache is perfectly happy to have a bunch > of files to include. Throw in a naming convention (e.g. files named > foo.ssl will be included by my SSL config file) and you''ve got some real > flexibility. > > On Wed, Feb 8, 2012 at 5:56 PM, Michael Stahnke <stah...@puppetlabs.com>wrote: > > > > > > > > > On Wed, Feb 8, 2012 at 3:46 PM, the_fonz <tim_stockf...@hotmail.com> > > wrote: > > > Hi, > > > > I''d like to start using Puppet to manage an httpd.conf file across > > > several webservers. I have a Puppet server and client config setup and > > > have followed a couple of simple "How To''s" to get off the ground. I''m > > > syncing a couple of files and ensuring certain packages are installed > > > etc on the client. > > > > Now, here ''s where I''m stuck... what happens if the httpd.conf file is > > > slightly different on each webserver? For example, each httpd.conf > > > file has multiple Virtual Host entries that are defined by the > > > webservers IP. <VirtualHost 10.3.200.131:80> for example. > > > You''ll want to look athttp://docs.puppetlabs.com/guides/templating.html > > > You can use a template and have it fill in variables. Luckily, the > > host''s IP address is already available as a variable via facter. > > > > How do I manage one httpd.conf file from the Puppet server given the > > > VirtualHost IP''s will be different on each server? I guess I just want > > > to "taylor" the http.conf file for each weberserver but manage it from > > > the Puppet Server. > > > > If anyone can give me a few pointers it would be appreciated. > > > > Thanks, > > > > -- > > > You received this message because you are subscribed to the Google > > Groups "Puppet Users" group.> > To post to this group, send email topuppet-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 topuppet-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.