Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/nginx/manifests/init.pp

Issue 29326134: Issue 3016 - Use Nginx PPA as package source (Closed)
Patch Set: Created Sept. 8, 2015, 2:51 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/nginx/manifests/init.pp
diff --git a/modules/nginx/manifests/init.pp b/modules/nginx/manifests/init.pp
index 7271af46fbbe6d417d83b9ca9fa9b683ad52495e..ed5f3b9c0e4b260b7445f17dcf8ddbd4ba1484fb 100644
--- a/modules/nginx/manifests/init.pp
+++ b/modules/nginx/manifests/init.pp
@@ -4,11 +4,11 @@ class nginx (
$ssl_session_cache = $nginx::params::ssl_session_cache
) inherits nginx::params {
+ apt::ppa {'ppa:nginx/stable':
+ }
+
apt::source {'nginx':
- location => "http://nginx.org/packages/ubuntu",
- repos => "nginx",
- key => "7BD9BF62",
- key_source => "http://nginx.org/keys/nginx_signing.key"
+ ensure => 'absent',
}
# Ensures that nginx is not installed from the Ubuntu sources
@@ -18,8 +18,8 @@ class nginx (
}
package {'nginx':
- ensure => '1.8.0-1~precise',
- require => Apt::Source['nginx']
+ ensure => '1.8.0-1+precise1',
+ require => Apt::Ppa['ppa:nginx/stable'],
}
File {
@@ -106,6 +106,13 @@ class nginx (
}
if $enabled == true {
+
+ if $is_default {
+ $default_conf = '/etc/nginx/sites-enabled/default'
+ ensure_resource('file', $default_conf, {ensure => 'absent'})
+ File[$default_conf] ~> Service['nginx']
+ }
+
file {"/etc/nginx/sites-enabled/${domain}":
ensure => link,
require => File["/etc/nginx/sites-available/${domain}"],
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld