Sha256: d8787e123f0fff294709ccabaa75b50e935220266e458281593376b5e6cdd7de

Contents?: true

Size: 1.08 KB

Versions: 28

Compression:

Stored size: 1.08 KB

Contents

module PoolParty
  module Resources
    # Usage: 
    # 
    # enable_php5 do
    #   extras :cli, :pspell, :mysql
    # end
    class Php < Resource
      def loaded(opts={}, parent=self)
        has_package(:name => "php5")
        has_package(:name => "libapache2-mod-php5")
        present_apache_module("php5")
        has_file( "/etc/php5/apache2/php.ini",
                :template => "apache2/php.ini.erb",
                :mode => 755,
                :requires => get_package("libapache2-mod-php5")) do
                  notifies get_exec("reload-apache2"), :run
                end

        has_file("/etc/apache2/conf.d/enable-php.conf", 
                 :mode => 755,                 
                 :content => <<-eos 
                 AddHandler php5-script php
                 AddType text/html       php
                 eos
                 ) do
                  notifies get_exec("reload-apache2"), :run
                 end
      end

      def extras(*names)
        names.each do |name|
         has_package(:name => "php5-#{name}")
        end
      end

    end

  end
  
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.1 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.10 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.11 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.12 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.13 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.14 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.15 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.16 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.17 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.2 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.3 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.4 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.5 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.6 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.7 lib/poolparty/plugins/apache2/php5.rb
auser-poolparty-1.3.8 lib/poolparty/plugins/apache2/php5.rb
fairchild-poolparty-1.3.17 lib/poolparty/plugins/apache2/php5.rb
fairchild-poolparty-1.3.5 lib/poolparty/plugins/apache2/php5.rb
poolparty-1.3.15 lib/poolparty/plugins/apache2/php5.rb