inspec/examples/kitchen-puppet/manifests/site.pp

34 lines
626 B
ObjectPascal
Raw Normal View History

2015-11-27 16:20:41 +00:00
# == Class prepare::site
#
# Install nginx from package repos
case $osfamily {
'RedHat': {
yumrepo { 'nginx':
descr => 'Nginx Repo',
baseurl => 'http://nginx.org/packages/centos/7/x86_64',
gpgkey => 'http://nginx.org/keys/nginx_signing.key',
enabled => 1
}
package { 'nginx':
require => [Yumrepo[nginx]],
ensure => 'latest'
}
}
'Debian': {
package { 'nginx':
ensure => 'latest'
}
}
default: {
fail("Unsupported platform: ${osfamily}/${operatingsystem}")
}
}
# Start the service
service { 'nginx':
enable => 'true',
ensure => 'running'
}