Sha256: 4e72c1641fe9a5f8cf961db81c2c235c02c4b9102bbec1b1f4f1f2faa7b7f5fc

Contents?: true

Size: 662 Bytes

Versions: 6

Compression:

Stored size: 662 Bytes

Contents

# encoding: utf-8
# author: Christoph Hartmann
# author: Dominik Richter

# install repositories for nginx
case node['platform']
when 'ubuntu'
  include_recipe('apt')
  # 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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-2.1.81 examples/kitchen-chef/recipes/nginx.rb
inspec-2.1.21 examples/kitchen-chef/recipes/nginx.rb
inspec-2.1.10 examples/kitchen-chef/recipes/nginx.rb
inspec-2.0.32 examples/kitchen-chef/recipes/nginx.rb
inspec-2.0.17 examples/kitchen-chef/recipes/nginx.rb
inspec-1.51.15 examples/kitchen-chef/recipes/nginx.rb