huangmingyou@gmail.com
2009-Apr-17 07:54 UTC
[Puppet Users] manage web server virtual host file
hi,guys
I have a puppet module named nginx , in this module I have a
define like this
define vhost ( $docroot = '''' ,$domain = '''',
$conn = ''10'',
$rate=''100k'') {
file {
"/opt/app/nginx/conf/vhosts/${domain}.conf":
require => package["rc_nginx"],
content => template ("rc_nginx/vhost.conf.erb");
}
}
so .
when I use this define manage muilty nginx virtual hosts in node.I''ll
use this code
nginx::vhost {
"1.example.com":
docroot => "/var/www/1",domain =>
"1.example.com"
"2.example.com":
docroot => "/var/www/2",domain =>
"3.example.com"
}
this code make 2 file in /opt/app/nginx/conf/vhosts;
But , when next time, I wan''t delete the 2.example.com virtual host. I
don''t have some good method to do this.
the just a example,in the real world ,may be more than 10 virtual
host.
so ,please help me !give me a good resolve.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
> [...] > But , when next time, I wan''t delete the 2.example.com virtual host. I > don''t have some good method to do this. > the just a example,in the real world ,may be more than 10 virtual > host. > > so ,please help me !give me a good resolve.have a look at ensure => absent of the file resource. cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---