Skip to content

Commit

Permalink
Merge pull request sous-chefs#28 from akrav/COOK-4666_Include_conditi…
Browse files Browse the repository at this point in the history
…on_to_execute_passenger_installation

COOK-4666 Include attribute conditional check to install passenger modul...
  • Loading branch information
Sean OMeara committed Aug 25, 2014
2 parents 90c1a93 + 229ac5d commit e5c8c6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Attributes
* `node['passenger']['apache_mpm']` - Override with an "override_attribute" (in a role, environment or with node.override) to "worker" or "threaded" to use apache2-threaded-dev package. Otherwise this assumes prefork.
* `node['passenger']['package']['name']` - Name of the package for passenger, default is nil, so this must be set before using the "package" install method/recipe.
* `node['passenger']['package']['version']` - Specify the version of the passenger package to install. Uses `version` attribute above by default. To install the version available by default (latest, usually), delete the attribute in a recipe with this line:
* `node['passenger']['install_module']` - Specify the boolean value which decides installing Passenger. Defaults to true, and setting to false skips the installation

```ruby
node.set['passenger']['package'].delete('version')
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
# set package version to nil, the distro package may not be the same version
default['passenger']['package']['version'] = nil
default['passenger']['ruby_bin'] = languages['ruby']['ruby_bin']
default['passenger']['install_module'] = true
1 change: 1 addition & 0 deletions recipes/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@
execute "passenger_module" do
command "#{node['passenger']['ruby_bin']} #{node['passenger']['root_path']}/bin/passenger-install-apache2-module _#{node['passenger']['version']}_ --auto"
creates node['passenger']['module_path']
only_if { node['passenger']['install_module'] }
end

0 comments on commit e5c8c6b

Please sign in to comment.