From 970f0067a827ffb96d1ea0749549fcc8adf69b4b Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 10 Mar 2014 02:34:42 +0100 Subject: [PATCH 1/5] Fix Suse packages No idea why someone chose to set all these packages for installation. I can't find any matching nginx.spec on Suse build service plus we don't want to set a specific nginx package version so just use 'nginx' as package. --- manifests/package/suse.pp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/manifests/package/suse.pp b/manifests/package/suse.pp index 0c044b0..9c908f9 100644 --- a/manifests/package/suse.pp +++ b/manifests/package/suse.pp @@ -17,12 +17,11 @@ # This class file is not called directly class nginx::package::suse { - $suse_packages = [ - 'nginx-0.8', 'apache2', 'apache2-itk', 'apache2-utils', 'gd', 'libapr1', - 'libapr-util1', 'libjpeg62', 'libpng14-14', 'libxslt', 'rubygem-daemon_controller', - 'rubygem-fastthread', 'rubygem-file-tail', 'rubygem-passenger', - 'rubygem-passenger-nginx', 'rubygem-rack', 'rubygem-rake', 'rubygem-spruz', - ] + if $caller_module_name != $module_name { + warning("${name} is deprecated as a public API of the ${module_name} module and should no longer be directly included in the manifest.") + } + + $suse_packages = ['nginx'] package { $suse_packages: ensure => $nginx::package_ensure, From bc5b256fa1f096fe7c7e4730ac0fca31c9786482 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 1 Apr 2014 19:07:50 +0200 Subject: [PATCH 2/5] temp fix for not compiled ssl and different package name --- manifests/package/suse.pp | 8 ++++---- templates/conf.d/proxy.conf.erb | 2 +- templates/vhost/fastcgi_params.erb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/package/suse.pp b/manifests/package/suse.pp index 9c908f9..6e6bd54 100644 --- a/manifests/package/suse.pp +++ b/manifests/package/suse.pp @@ -15,15 +15,15 @@ # Sample Usage: # # This class file is not called directly -class nginx::package::suse { +class nginx::package::suse ( + $package_name = 'nginx' +) { if $caller_module_name != $module_name { warning("${name} is deprecated as a public API of the ${module_name} module and should no longer be directly included in the manifest.") } - $suse_packages = ['nginx'] - - package { $suse_packages: + package { $package_name: ensure => $nginx::package_ensure, } } diff --git a/templates/conf.d/proxy.conf.erb b/templates/conf.d/proxy.conf.erb index 640061a..aa473f5 100644 --- a/templates/conf.d/proxy.conf.erb +++ b/templates/conf.d/proxy.conf.erb @@ -6,7 +6,7 @@ proxy_send_timeout <%= @proxy_send_timeout %>; proxy_read_timeout <%= @proxy_read_timeout %>; proxy_buffers <%= @proxy_buffers %>; proxy_buffer_size <%= @proxy_buffer_size %>; -proxy_http_version <%= @proxy_http_version %>; +<%# proxy_http_version <%= @proxy_http_version %><%#; %> <% @proxy_set_header.each do |header| %> proxy_set_header <%= header %>;<% end %> proxy_headers_hash_bucket_size <%= @proxy_headers_hash_bucket_size %>; diff --git a/templates/vhost/fastcgi_params.erb b/templates/vhost/fastcgi_params.erb index fe8bc20..fb6b2a6 100644 --- a/templates/vhost/fastcgi_params.erb +++ b/templates/vhost/fastcgi_params.erb @@ -21,7 +21,7 @@ fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; -fastcgi_param HTTPS $https; +<%# fastcgi_param HTTPS $https; %> # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; From 52923a4d554e77bee8386569cac32525b4643d9c Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 28 May 2014 09:12:28 +0200 Subject: [PATCH 3/5] use default package_name config for suse --- manifests/package.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manifests/package.pp b/manifests/package.pp index 8e2ff71..33b06f1 100644 --- a/manifests/package.pp +++ b/manifests/package.pp @@ -45,8 +45,9 @@ class nginx::package( } 'suse': { class { 'nginx::package::suse': - require => Anchor['nginx::package::begin'], - before => Anchor['nginx::package::end'], + package_name => $package_name, + require => Anchor['nginx::package::begin'], + before => Anchor['nginx::package::end'], } } 'archlinux': { From 817526cdc91f72717123c2f95a55114f2779e843 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Fri, 20 Jun 2014 16:24:50 +0200 Subject: [PATCH 4/5] reset broken templates --- templates/conf.d/proxy.conf.erb | 2 +- templates/vhost/fastcgi_params.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/conf.d/proxy.conf.erb b/templates/conf.d/proxy.conf.erb index aa473f5..640061a 100644 --- a/templates/conf.d/proxy.conf.erb +++ b/templates/conf.d/proxy.conf.erb @@ -6,7 +6,7 @@ proxy_send_timeout <%= @proxy_send_timeout %>; proxy_read_timeout <%= @proxy_read_timeout %>; proxy_buffers <%= @proxy_buffers %>; proxy_buffer_size <%= @proxy_buffer_size %>; -<%# proxy_http_version <%= @proxy_http_version %><%#; %> +proxy_http_version <%= @proxy_http_version %>; <% @proxy_set_header.each do |header| %> proxy_set_header <%= header %>;<% end %> proxy_headers_hash_bucket_size <%= @proxy_headers_hash_bucket_size %>; diff --git a/templates/vhost/fastcgi_params.erb b/templates/vhost/fastcgi_params.erb index fb6b2a6..fe8bc20 100644 --- a/templates/vhost/fastcgi_params.erb +++ b/templates/vhost/fastcgi_params.erb @@ -21,7 +21,7 @@ fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; -<%# fastcgi_param HTTPS $https; %> +fastcgi_param HTTPS $https; # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; From dc1b4b528c6cc2691d0bcba12543f96bc4f5f995 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Fri, 20 Jun 2014 16:35:23 +0200 Subject: [PATCH 5/5] fix tests --- spec/classes/package_spec.rb | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/spec/classes/package_spec.rb b/spec/classes/package_spec.rb index 0ff2ec6..0b365a3 100644 --- a/spec/classes/package_spec.rb +++ b/spec/classes/package_spec.rb @@ -87,24 +87,7 @@ describe 'nginx::package' do shared_examples 'suse' do |operatingsystem| let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'Suse'}} [ - 'nginx-0.8', - 'apache2', - 'apache2-itk', - 'apache2-utils', - 'gd', - 'libapr1', - 'libapr-util1', - 'libjpeg62', - 'libpng14-14', - 'libxslt', - 'rubygem-daemon_controller', - 'rubygem-fastthread', - 'rubygem-file-tail', - 'rubygem-passenger', - 'rubygem-passenger-nginx', - 'rubygem-rack', - 'rubygem-rake', - 'rubygem-spruz', + 'nginx', ].each do |package| it { should contain_package("#{package}") } end