From 0d9d62f20b15d6dcffc10acc82cac845f7f5ca76 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 16 Feb 2020 17:34:43 +0000 Subject: [PATCH] Make nginx cookbook default to using the nginx upstream repository --- cookbooks/nginx/attributes/default.rb | 3 +++ cookbooks/nginx/metadata.rb | 1 + cookbooks/nginx/recipes/default.rb | 1 + roles/imagery.rb | 2 +- roles/tilecache.rb | 3 --- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cookbooks/nginx/attributes/default.rb b/cookbooks/nginx/attributes/default.rb index e37b42999..21d22045b 100644 --- a/cookbooks/nginx/attributes/default.rb +++ b/cookbooks/nginx/attributes/default.rb @@ -14,3 +14,6 @@ default[:nginx][:cache][:proxy][:directory] = "/var/cache/nginx/proxy-cache" default[:nginx][:cache][:proxy][:keys_zone] = "proxy_cache_zone:128M" default[:nginx][:cache][:proxy][:inactive] = "45d" default[:nginx][:cache][:proxy][:max_size] = "16384M" + +# Enable nginx repository +default[:apt][:sources] = node[:apt][:sources] | ["nginx"] diff --git a/cookbooks/nginx/metadata.rb b/cookbooks/nginx/metadata.rb index 9e544a8a2..dc7758e3a 100644 --- a/cookbooks/nginx/metadata.rb +++ b/cookbooks/nginx/metadata.rb @@ -6,6 +6,7 @@ description "Installs and configures nginx" version "1.0.0" supports "ubuntu" +depends "apt" depends "munin" depends "networking" depends "ssl" diff --git a/cookbooks/nginx/recipes/default.rb b/cookbooks/nginx/recipes/default.rb index aec734c17..94754546c 100644 --- a/cookbooks/nginx/recipes/default.rb +++ b/cookbooks/nginx/recipes/default.rb @@ -17,6 +17,7 @@ # limitations under the License. # +include_recipe "apt" include_recipe "munin" package "nginx" diff --git a/roles/imagery.rb b/roles/imagery.rb index fedd79afc..b561689a7 100644 --- a/roles/imagery.rb +++ b/roles/imagery.rb @@ -12,7 +12,7 @@ default_attributes( } }, :apt => { - :sources => %w[nginx ubuntugis-unstable] + :sources => %w[ubuntugis-unstable] }, :sysctl => { :sockets => { diff --git a/roles/tilecache.rb b/roles/tilecache.rb index dc6fadf7b..d0d14f751 100644 --- a/roles/tilecache.rb +++ b/roles/tilecache.rb @@ -9,9 +9,6 @@ default_attributes( } } }, - :apt => { - :sources => ["nginx"] - }, :networking => { :tcp_fastopen_key => "tile" }, -- 2.43.2