Sha256: 2619620642cbcc2acc5ccdbddf5ad06c255fdfbdb783cda4364cb59875d90d7a

Contents?: true

Size: 1.79 KB

Versions: 20

Compression:

Stored size: 1.79 KB

Contents

# Class: nginx::package::redhat
#
# This module manages NGINX package installation on RedHat based systems
#
# Parameters:
#
# There are no default parameters for this class.
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
# This class file is not called directly
class nginx::package::redhat {
  $redhat_packages = ['nginx', 'gd', 'libXpm', 'libxslt']

  case $::operatingsystem {
    'fedora': {
      # nginx.org does not supply RPMs for fedora
      # fedora 18 provides 1.2.x packages
      # fedora 19 has 1.4.x packages are in

      # fedora 18 users will need to supply their own nginx 1.4 rpms and/or repo
      if $::lsbmajdistrelease < 19 {
        notice("${::operatingsystem} ${::lsbmajdistrelease} does not supply nginx >= 1.4 packages")
      }
    }
    default: {
      case $::lsbmajdistrelease {
        5, 6: {
          $os_rel = $::lsbmajdistrelease
        }
        default: {
          # Amazon uses the year as the $::lsbmajdistrelease
          $os_rel = 6
        }
      }

      # as of 2013-07-28
      # http://nginx.org/packages/centos appears to be identical to
      # http://nginx.org/packages/rhel
      # no other dedicated dirs exist for platforms under $::osfamily == redhat
      yumrepo { 'nginx-release':
        baseurl  => "http://nginx.org/packages/rhel/${os_rel}/\$basearch/",
        descr    => 'nginx repo',
        enabled  => '1',
        gpgcheck => '1',
        priority => '1',
        gpgkey   => 'http://nginx.org/keys/nginx_signing.key',
      }

      Yumrepo['nginx-release'] -> Package[$redhat_packages]
    }
  }

  #Define file for nginx-repo so puppet doesn't delete it
  file { '/etc/yum.repos.d/nginx-release.repo':
    ensure  => present,
    require => Yumrepo['nginx-release'],
  }

  package { $redhat_packages:
    ensure  => $nginx::package_ensure,
  }

}

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/nginx/manifests/package/redhat.pp
freighthop-0.6.0 modules/nginx/manifests/package/redhat.pp
freighthop-0.5.2 modules/nginx/manifests/package/redhat.pp
freighthop-0.5.1 modules/nginx/manifests/package/redhat.pp
freighthop-0.5.0 modules/nginx/manifests/package/redhat.pp
freighthop-0.4.1 modules/nginx/manifests/package/redhat.pp
freighthop-0.4.0 modules/nginx/manifests/package/redhat.pp
freighthop-0.3.3 modules/nginx/manifests/package/redhat.pp
freighthop-0.3.2 modules/nginx/manifests/package/redhat.pp
freighthop-0.3.1 modules/nginx/manifests/package/redhat.pp
freighthop-0.3.0 modules/nginx/manifests/package/redhat.pp
freighthop-0.2.1 modules/nginx/manifests/package/redhat.pp
freighthop-0.2.0 modules/nginx/manifests/package/redhat.pp
freighthop-0.1.0 modules/nginx/manifests/package/redhat.pp
freighthop-0.0.6 modules/nginx/manifests/package/redhat.pp
freighthop-0.0.5 modules/nginx/manifests/package/redhat.pp
freighthop-0.0.4 modules/nginx/manifests/package/redhat.pp
freighthop-0.0.3 modules/nginx/manifests/package/redhat.pp
freighthop-0.0.2 modules/nginx/manifests/package/redhat.pp
freighthop-0.0.1 modules/nginx/manifests/package/redhat.pp