Browse Source

Puppet: nginx com arquivos simples (sem usar modulo puppet)

producao
Marcio Mazza 10 years ago
parent
commit
2f70093937
  1. 28
      puppet/manifests/site.pp

28
puppet/manifests/site.pp

@ -125,9 +125,31 @@ exec { 'supervisor_update':
###########################################################################
# NGINX
class { 'nginx': }
package { 'nginx': }
nginx::resource::vhost { 'localhost':
www_root => '/vagrant/www_temp',
file { '/etc/nginx/sites-available/sigi.vhost':
ensure => link,
target => "${sigi_dir}/etc/nginx/sites-available/sigi.vhost",
require => [
Vcsrepo[$sigi_dir],
Package['nginx'] ]
}
file { '/etc/nginx/sites-enabled/sigi.vhost':
ensure => link,
target => '/etc/nginx/sites-available/sigi.vhost',
require => Package['nginx'],
}
exec { 'nginx_restart':
command => 'service nginx restart',
refreshonly => true,
subscribe => [
File['/etc/nginx/sites-enabled/sigi.vhost'],
Vcsrepo[$sigi_dir]],
}
file { '/etc/nginx/sites-enabled/default':
ensure => absent,
}

Loading…
Cancel
Save