Adding to that, I’ve tried to install another package using the exact same method:
php_pear “mongo” do
And that worked as expected:
[Tue, 23 Oct 2012 12:30:59 +0000] INFO: Processing php_pear[mongo] action install (zynkconverter::default line 21)
[Tue, 23 Oct 2012 12:31:02 +0000] INFO: Installing php_pear[mongo] version 1.3.0beta2
[Tue, 23 Oct 2012 12:31:15 +0000] INFO: Processing template[/etc/php5/conf.d/mongo.ini] action create (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/php/providers/pear.rb line 208)
[Tue, 23 Oct 2012 12:31:15 +0000] INFO: template[/etc/php5/conf.d/mongo.ini] mode changed to 644
[Tue, 23 Oct 2012 12:31:15 +0000] INFO: template[/etc/php5/conf.d/mongo.ini] updated content
My conclusion is that Chef’s “idempotency” (is that a word?) is kicking in and not installing PECL’s gearman because it thinks that it’s already installed, which is not the case. How do I check that, and what should I do to remediate it?
This is an Ubuntu 12.04, and no gearman-related packages are installed by any means.
On Monday, October 22, 2012 at 17:05, Cassiano Leal wrote:
I’m trying to get the php_pear LWRP to install the PECL package gearman.
To that intent, I have added the php opscode cookbook as a dependency, and then inserted the following lines of code in the recipe:
php_pear “gearman” do
When the chef-client runs, I can see this in the logs:
[Mon, 22 Oct 2012 18:48:44 +0000] INFO: Processing php_pear_channel[pear.php.net (http://pear.php.net)] action update (php::default line 25)
[Mon, 22 Oct 2012 18:48:45 +0000] INFO: Processing php_pear_channel[pecl.php.net (http://pecl.php.net)] action update (php::default line 29)
[Mon, 22 Oct 2012 18:48:52 +0000] INFO: Processing php_pear[gearman] action install (zynkconverter::default line 17)
But no gearman package gets installed. If i then later SSH into the machine and call “pecl install gearman”, it does what I want but kinda misses the point of using Chef