Skip to content

Commit

Permalink
Fix tests for fastcgi
Browse files Browse the repository at this point in the history
The fastcgi server define wasn't including apache::mod::fastcgi, but
this is idempotent and required, since it declares a dependency on
Apache::Mod['fastcgi'].

I also cleaned up some linting things and put the notify on the service
class instead of the service resource (as is the newer pattern).
  • Loading branch information
hunner committed Jun 27, 2014
1 parent c9a5404 commit e8ebe47
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions manifests/fastcgi/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
$host = '127.0.0.1:9000',
$timeout = 15,
$flush = false,
$faux_path = "/var/www/$name.fcgi",
$alias = "/$name.fcgi",
$faux_path = "/var/www/${name}.fcgi",
$alias = "/${name}.fcgi",
$file_type = 'application/x-httpd-php'
) {
include apache::mod::fastcgi

Apache::Mod['fastcgi'] -> Apache::Fastcgi::Server["$title"]
Apache::Mod['fastcgi'] -> Apache::Fastcgi::Server[$title]

file { "fastcgi-pool-$name.conf":
file { "fastcgi-pool-${name}.conf":
ensure => present,
path => "${::apache::confd_dir}/fastcgi-pool-$name.conf",
path => "${::apache::confd_dir}/fastcgi-pool-${name}.conf",
owner => 'root',
group => $::apache::params::root_group,
mode => '0644',
content => template('apache/fastcgi/server.erb'),
require => Exec["mkdir ${::apache::confd_dir}"],
before => File[$::apache::confd_dir],
notify => Service['httpd']
notify => Class['apache::service'],
}
}

0 comments on commit e8ebe47

Please sign in to comment.