Don't include the apt recipe over and over again in the recipes

We run apt_update once with chef and we already update the cache directly on the container at start. We don't need to try to do the same thing 3 other times.

Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
Tim Smith 2019-02-13 17:19:55 -08:00
parent 55a8f752f9
commit 097e2deedc
3 changed files with 3 additions and 11 deletions

View file

@ -5,7 +5,6 @@
# install repositories for nginx
case node['platform']
when 'ubuntu'
include_recipe('apt')
# if ubuntu, install
apt_repository 'nginx-php' do
uri 'ppa:nginx/stable'

View file

@ -4,12 +4,6 @@
#
# prepares container for normal use :-)
# install docker pre-conditions
if ['ubuntu', 'debian'].include?(node['platform'])
include_recipe('apt')
# if package lsb-release & procps is not installed
# chef returns an empty node['lsb']['codename']
package("lsb-release")
package("procps")
end
# if package lsb-release & procps is not installed
# chef returns an empty node['lsb']['codename']
package %w(procps lsb-release) if platform_family?('debian')

View file

@ -7,7 +7,6 @@
case node['platform']
when 'ubuntu'
# install ntp as a service
include_recipe 'apt::default'
package 'ntp'
when 'centos'