Class: PoolParty::Plugin::EnablePhp5
- Inherits:
-
Plugin
- Object
- PoolParty::PoolPartyBaseClass
- Service
- Plugin
- PoolParty::Plugin::EnablePhp5
- Defined in:
- lib/poolparty/plugins/apache2/php5.rb
Overview
Usage:
enable_php5 do
extras :cli, :pspell, :mysql
end
Instance Attribute Summary
Attributes inherited from PoolParty::PoolPartyBaseClass
#init_opts, #ordered_resources
Instance Method Summary collapse
Methods inherited from Plugin
#after_create, #before_load, #bootstrap_commands, #bootstrap_gems, #calls, #cloud, #configure_commands, #enable, inherited, #initialize, #is_plugin?
Methods included from Callbacks
Methods included from DependencyResolverCloudExtensions
Methods included from CloudResourcer
#dependency_resolver, #instances, #plugin_directory, #run_stored_block, #store_block, #stored_block, #using
Methods inherited from Service
add_has_and_does_not_have_methods_for, #cloud, #to_properties_hash
Methods inherited from PoolParty::PoolPartyBaseClass
add_has_and_does_not_have_methods_for, #add_resource, add_resource_lookup_method, #add_service, #add_to_parent_if_parent_exists_and_is_a_service, #get_local_resource, #get_name_from_options_and_extra_options, #get_resource, #handle_option_values, #in_local_resources?, #initialize, #inspect, #is_a_resource?, #is_plugin?, #plugin_store, #resource, #resources, #run_in_context, #run_with_callbacks, #search_in_known_locations, #store_in_local_resources, #to_hash, #to_json
Methods included from SearchablePaths
Constructor Details
This class inherits a constructor from PoolParty::Plugin::Plugin
Instance Method Details
#extras(*names) ⇒ Object
30 31 32 33 34 |
# File 'lib/poolparty/plugins/apache2/php5.rb', line 30 def extras(*names) names.each do |name| has_package(:name => "php5-#{name}") end end |
#loaded(opts = {}, parent = self) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/poolparty/plugins/apache2/php5.rb', line 10 def loaded(opts={}, parent=self) has_package(:name => "php5") has_package(:name => "libapache2-mod-php5") present_apache_module("php5") has_file({:name => "/etc/php5/apache2/php.ini", :template => "apache2/php.ini.erb", :mode => 755, :requires => get_package("libapache2-mod-php5"), :calls => get_exec("reload-apache2")}) has_file(:name => "/etc/apache2/conf.d/enable-php.conf", :mode => 755, :calls => get_exec("reload-apache2"), :content => <<-eos AddHandler php5-script php AddType text/html php eos ) end |