From 5f58803b8d129cd93a3ef6dcb652db58c43d7453 Mon Sep 17 00:00:00 2001 From: K Jonathan Harker Date: Wed, 4 Jun 2014 17:27:48 -0700 Subject: [PATCH] Use the correct name for apache The name of the apache package and service are different on different operating systems. Fortunately, the apache module populates a variable with the correct name for us. This is also true of the apache ssl package. Change-Id: I7d93e56281f828cba9262c135b0beb43dce9748a --- modules/cgit/manifests/init.pp | 2 +- modules/graphite/manifests/init.pp | 8 ++++---- modules/lodgeit/manifests/site.pp | 4 ++-- modules/mailman/manifests/init.pp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/cgit/manifests/init.pp b/modules/cgit/manifests/init.pp index 333f5e73e2..f1ad2a67e0 100644 --- a/modules/cgit/manifests/init.pp +++ b/modules/cgit/manifests/init.pp @@ -144,7 +144,7 @@ class cgit( group => 'root', mode => '0644', content => template('cgit/ssl.conf.erb'), - require => Package['mod_ssl'], + require => Package[$::apache::params::ssl_package], } file { $cgitdir: diff --git a/modules/graphite/manifests/init.pp b/modules/graphite/manifests/init.pp index 05bd65437a..f681bc8dab 100644 --- a/modules/graphite/manifests/init.pp +++ b/modules/graphite/manifests/init.pp @@ -87,7 +87,7 @@ class graphite( ensure => directory, owner => 'www-data', group => 'www-data', - require => [Package['apache2'], + require => [Package[$::apache::params::apache_name], File['/var/lib/graphite']] } @@ -95,7 +95,7 @@ class graphite( ensure => directory, owner => 'www-data', group => 'www-data', - require => Package['apache2'], + require => Package[$::apache::params::apache_name], } file { '/etc/graphite': @@ -110,7 +110,7 @@ class graphite( onlyif => 'test ! -f /var/lib/graphite/storage/graphite.db', require => [ Exec['install_graphite_web'], File['/var/lib/graphite'], - Package['apache2'], + Package[$::apache::params::apache_name], File['/usr/local/lib/python2.7/dist-packages/graphite/local_settings.py'], File['/usr/local/bin/graphite-init-db.py'], File['/etc/graphite/admin.ini']], @@ -182,7 +182,7 @@ class graphite( group => 'www-data', content => template('graphite/admin.ini'), require => [ File['/etc/graphite'], - Package['apache2']], + Package[$::apache::params::apache_name]], } file { '/etc/init.d/carbon-cache': diff --git a/modules/lodgeit/manifests/site.pp b/modules/lodgeit/manifests/site.pp index 75d48d45e0..026a5846c6 100644 --- a/modules/lodgeit/manifests/site.pp +++ b/modules/lodgeit/manifests/site.pp @@ -21,7 +21,7 @@ define lodgeit::site( ensure => present, content => template('lodgeit/upstart.erb'), replace => true, - require => Package['apache2'], + require => Package[$::apache::params::apache_name], notify => Service["${name}-paste"], } @@ -66,6 +66,6 @@ define lodgeit::site( service { "${name}-paste": ensure => running, provider => upstart, - require => Service['apache2'], + require => Service[$::apache::params::apache_name], } } diff --git a/modules/mailman/manifests/init.pp b/modules/mailman/manifests/init.pp index 1a6a9a78e5..57fa2e7317 100644 --- a/modules/mailman/manifests/init.pp +++ b/modules/mailman/manifests/init.pp @@ -25,7 +25,7 @@ class mailman($vhost_name=$::fqdn) { group => 'root', replace => true, mode => '0444', - require => Package['apache2'], + require => Package[$::apache::params::apache_name], } file { '/etc/mailman/mm_cfg.py':