Sound like you only have the passenger gem installed, it needs to install 
the apache module.  Here is a snippet from a Centos puppet build.

####    init.pp    ####
#
# modules/passenger/manifests/init.pp
class passenger {

  package { 'rack':
    ensure   => '1.1.0',
    provider => 'gem',
    require  => Class['rubygems'],
    before   => Package['passenger'],
  }

  package { 'passenger':
    ensure   => installed,
    provider => 'gem',
    require  => Package['rack'],
    before   => File['/opt/passenger'],
  }

  ####
  # auto install passenger apache2 module and create links
  file { '/opt/passenger':
    ensure => 'directory',
    owner  => 'root',
    group  => 'root',
    mode   => '0755',
    before => File['/opt/passenger/auto_passenger_install.sh'],
  }

  file { '/opt/passenger/auto_passenger_install.sh':
    ensure => 'present',
    owner  => 'root',
    group  => 'root',
    mode   => '0755',
      source => 'puppet:///modules/passenger/auto_passenger_install.sh',
    before => Exec['auto_passenger_install'],
  }

  exec { 'auto_passenger_install':
    command => '/opt/passenger/auto_passenger_install.sh',
    timeout => '900',
    creates => '/etc/passenger',
  }
}

The install script.  This installs the mod_passenger.so and links the 
directory to /etc/passenger (which means easy to upgrade version, the link 
is just swapped - apache still needs to restart as it reads the hardlink 
when started.)

#!/bin/bash
####   auto_passenger_install.sh   ####
#
# modules/passenger/files/auto_passenger_install.sh
#########
# Script variables
SCRIPT=$(readlink -f $0)
SCRIPTNAME=$(basename "$SCRIPT")
SCRIPTPATH=$(dirname $SCRIPT)
SERVER=`hostname | cut -d'.' -f1-1`
TIMESTAMP=$(date +%s)
RUNDATE=`date -d @$TIMESTAMP +%Y%m%d%H%M%S`
LOG_PATH=/var/log/scripts/$SCRIPTNAME
if [ ! -d $LOG_PATH ]; then
  mkdir -p $LOG_PATH
fi
LOGFILE=$LOG_PATH/$RUNDATE.$SCRIPTNAME.log

RUBYGEMS_VER_DIR=$(basename `facter rubysitedir`)
PASSENGER_VERSION=`gem list --local | grep passenger | sed -e 's/passenger 
(//g;s/)//g'`
cd /usr/lib/ruby/gems/$RUBYGEMS_VER_DIR/gems/passenger-$PASSENGER_VERSION
/usr/bin/ruby /usr/bin/rake apache2:clean apache2 RELEASE=yes

ln -s 
/usr/lib/ruby/gems/$RUBYGEMS_VER_DIR/gems/passenger-$PASSENGER_VERSION 
/etc/passenger

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/CS-7QcEic_IJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to