Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removes Exec['reload-nginx'] and adds notify/reload to Service['nginx']

  • Loading branch information...
commit c721a2fa9c42c48d47d3ad99eac1fe260c47e90b 1 parent 4d9d696
@LarsFronius LarsFronius authored
View
2  manifests/config.pp
@@ -21,7 +21,7 @@
mode => '0644',
owner => 'root',
group => 'root',
- notify => Exec['reload-nginx'],
+ notify => Service['nginx'],
}
}
View
2  manifests/fcgi/site.pp
@@ -64,7 +64,7 @@
-newkey rsa:2048 -out /etc/nginx/ssl/${name}.pem -keyout /etc/nginx/ssl/${name}.key",
unless => "/usr/bin/test -f /etc/nginx/ssl/${name}.pem",
require => File['/etc/nginx/ssl'],
- notify => Exec['reload-nginx'],
+ notify => Service['nginx'],
}
}
View
9 manifests/init.pp
@@ -40,11 +40,13 @@
if ! defined(Package['nginx']) { package { 'nginx': ensure => installed }}
+ #restart-command is a quick-fix here, until http://projects.puppetlabs.com/issues/1014 is solved
service { 'nginx':
ensure => running,
enable => true,
hasrestart => true,
require => File['/etc/nginx/nginx.conf'],
+ restart => '/etc/init.d/nginx reload'
}
file { '/etc/nginx/nginx.conf':
@@ -53,7 +55,7 @@
owner => 'root',
group => 'root',
content => template('nginx/nginx.conf.erb'),
- notify => Exec['reload-nginx'],
+ notify => Service['nginx'],
require => Package['nginx'],
}
@@ -86,9 +88,4 @@
ensure => absent,
require => Package['nginx'],
}
-
- exec { 'reload-nginx':
- command => '/etc/init.d/nginx reload',
- refreshonly => true,
- }
}
View
6 manifests/install_site.pp
@@ -13,7 +13,7 @@
owner => 'root',
group => 'root',
alias => "sites-${name}",
- notify => Exec['reload-nginx'],
+ notify => Service['nginx'],
require => Package['nginx'],
}
}
@@ -26,7 +26,7 @@
alias => "sites-$name",
content => $content,
require => Package['nginx'],
- notify => Exec['reload-nginx'],
+ notify => Service['nginx'],
}
}
}
@@ -36,7 +36,7 @@
unless => "/bin/sh -c '[ -L /etc/nginx/sites-enabled/${name} ] && \
[ /etc/nginx/sites-enabled/${name} -ef /etc/nginx/sites-available/${name} ]'",
path => ['/usr/bin/', '/bin/'],
- notify => Exec['reload-nginx'],
+ notify => Service['nginx'],
require => File["sites-${name}"],
}
}
View
2  manifests/site.pp
@@ -18,7 +18,7 @@
exec { "/bin/rm -f /etc/nginx/sites-enabled/${name}":
onlyif => "/bin/sh -c '[ -L /etc/nginx/sites-enabled/${name} ] && \
[ /etc/nginx/sites-enabled/$name -ef /etc/nginx/sites-available/${name} ]'",
- notify => Exec['reload-nginx'],
+ notify => Service['nginx'],
require => Package['nginx'],
}
}
View
2  manifests/site_include.pp
@@ -14,7 +14,7 @@
group => 'root',
content => $content,
require => File[$nginx::nginx_includes],
- notify => Exec['reload-nginx'],
+ notify => Service['nginx'],
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.