mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
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:
parent
55a8f752f9
commit
097e2deedc
3 changed files with 3 additions and 11 deletions
|
@ -5,7 +5,6 @@
|
||||||
# install repositories for nginx
|
# install repositories for nginx
|
||||||
case node['platform']
|
case node['platform']
|
||||||
when 'ubuntu'
|
when 'ubuntu'
|
||||||
include_recipe('apt')
|
|
||||||
# if ubuntu, install
|
# if ubuntu, install
|
||||||
apt_repository 'nginx-php' do
|
apt_repository 'nginx-php' do
|
||||||
uri 'ppa:nginx/stable'
|
uri 'ppa:nginx/stable'
|
||||||
|
|
|
@ -4,12 +4,6 @@
|
||||||
#
|
#
|
||||||
# prepares container for normal use :-)
|
# prepares container for normal use :-)
|
||||||
|
|
||||||
# install docker pre-conditions
|
# if package lsb-release & procps is not installed
|
||||||
if ['ubuntu', 'debian'].include?(node['platform'])
|
# chef returns an empty node['lsb']['codename']
|
||||||
include_recipe('apt')
|
package %w(procps lsb-release) if platform_family?('debian')
|
||||||
|
|
||||||
# if package lsb-release & procps is not installed
|
|
||||||
# chef returns an empty node['lsb']['codename']
|
|
||||||
package("lsb-release")
|
|
||||||
package("procps")
|
|
||||||
end
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
case node['platform']
|
case node['platform']
|
||||||
when 'ubuntu'
|
when 'ubuntu'
|
||||||
# install ntp as a service
|
# install ntp as a service
|
||||||
include_recipe 'apt::default'
|
|
||||||
package 'ntp'
|
package 'ntp'
|
||||||
|
|
||||||
when 'centos'
|
when 'centos'
|
||||||
|
|
Loading…
Reference in a new issue