From: Tom Hughes Date: Sun, 16 Feb 2020 17:34:43 +0000 (+0000) Subject: Make nginx cookbook default to using the nginx upstream repository X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/0d9d62f20b15d6dcffc10acc82cac845f7f5ca76 Make nginx cookbook default to using the nginx upstream repository --- 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" },