mirror of
https://github.com/inspec/inspec
synced 2024-12-19 17:43:44 +00:00
097e2deedc
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>
29 lines
608 B
Ruby
29 lines
608 B
Ruby
# encoding: utf-8
|
|
# author: Christoph Hartmann
|
|
# author: Dominik Richter
|
|
|
|
# install repositories for nginx
|
|
case node['platform']
|
|
when 'ubuntu'
|
|
# if ubuntu, install
|
|
apt_repository 'nginx-php' do
|
|
uri 'ppa:nginx/stable'
|
|
distribution node['lsb']['codename']
|
|
end
|
|
when 'centos'
|
|
# add repo for Centos 7
|
|
yum_repository 'nginx' do
|
|
description 'Nginx Repo'
|
|
baseurl 'http://nginx.org/packages/centos/7/x86_64'
|
|
gpgkey 'http://nginx.org/keys/nginx_signing.key'
|
|
action :create
|
|
end
|
|
end
|
|
|
|
# install nginx package
|
|
package 'nginx'
|
|
|
|
# start the service
|
|
service 'nginx' do
|
|
action :start
|
|
end
|