Question

This is the only line in my recipe

include_recipe "apache2::mod_jk"

This calls the mod_jk recipe found in the opscode apache2 cookbook, that for the sake of simplicity I'll write here:

package 'libapache2-mod-jk' do
  case node['platform_family']
  when 'rhel', 'fedora', 'suse'
    package_name 'mod_jk'
  else
    package_name 'libapache2-mod-jk'
  end
end

apache_module 'jk'

To my understanding this will only install mod_jk and apache, but apache won't be configured with chef because I am not using the apache2::default... However this doesn't happen, apache2 gets installed and configured using the Chef tempaltes.

How does this work? Am I missing something?

Was it helpful?

Solution

It is because the definition apache_module 'jk' calls apache::default here: https://github.com/opscode-cookbooks/apache2/blob/master/definitions/apache_module.rb#L21

You could make your own recipe that installs the package.

More info on cookbook definitions: http://docs.opscode.com/essentials_cookbook_definitions.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top