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

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

Issue 29326229: Issue 3016 - Improve Nginx source => PPA migration steps (Closed)
Patch Set: Created Sept. 10, 2015, 1:09 a.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 ed5f3b9c0e4b260b7445f17dcf8ddbd4ba1484fb..04e1db48a8a08fa7a6c91b65d80fe49d6e21c597 100644
--- a/modules/nginx/manifests/init.pp
+++ b/modules/nginx/manifests/init.pp
@@ -11,15 +11,18 @@ class nginx (
ensure => 'absent',
}
- # Ensures that nginx is not installed from the Ubuntu sources
- package {'nginx-common':
- ensure => purged,
- before => Package['nginx']
+ exec {'purge-nginx':
+ command => '/usr/bin/apt-get -y purge nginx',
+ logoutput => true,
+ path => '/usr/sbin:/usr/bin:/sbin:/bin',
+ refreshonly => true,
+ returns => [0, 100],
+ subscribe => Apt::Ppa['ppa:nginx/stable'],
}
package {'nginx':
ensure => '1.8.0-1+precise1',
- require => Apt::Ppa['ppa:nginx/stable'],
+ require => Exec['purge-nginx'],
}
File {
@@ -110,7 +113,7 @@ class nginx (
if $is_default {
$default_conf = '/etc/nginx/sites-enabled/default'
ensure_resource('file', $default_conf, {ensure => 'absent'})
- File[$default_conf] ~> Service['nginx']
+ Package['nginx'] -> File[$default_conf] ~> Service['nginx']
}
file {"/etc/nginx/sites-enabled/${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