inspec/examples/kitchen-puppet/manifests/site.pp
2015-11-27 17:20:41 +01:00

33 lines
626 B
Puppet

# == 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'
}