I am using Chef's community cookbooks, in particular the apt, php and apache2 cookbooks. My role which is ran on a node:
name "development"
# list of recipes to run
run_list(
"recipe[apt]",
"recipe[php::source]",
"recipe[apache2]",
"recipe[apache2::mod_php5]",
"recipe[apache2::mod_rewrite]",
)
# attributes setup
override_attributes(
"php" => {
"version" => "5.4.27",
"checksum" => "3080690bbb14d798a511e325a81a6f32"
}
)
As you can see, I would like to install PHP 5.4.27 from source. If I run only the php::source
, I indeed have PHP 5.4.27. However, when I run the apache2 cookbook as well, the apache2::mod_php5
installs another PHP 5.3 from repository (Ubuntu 12.04 has PHP 5.3 in its repo). I guess the package installs libapache2-mod-php5
which relies on php5
package therefore the PHP is installed again.
I don't want two versions of PHP. I would like to have only one; the PHP 5.4.27. Both for Apache and CLI. Can I somehow instruct apache cookbook to use the PHP 5.4.27?