I spun up an instance of Ubuntu 10.10 in EC2 tonight and installed
puppet, for the purpose of testing mongodb. Ubuntu ships with Puppet
2.6.1
To do this I have a recipe which:
Installs the official mongodb repo:
exec { "mongodb_repo":
command => "echo deb http://downloads.mongodb.org/distros/ubuntu
10.4 10gen > /etc/apt/sources.list.d/mondodb.list && apt-key adv --
keyserver keyserver.ubuntu.com --recv 7F0CEB10 && apt-get update",
creates => "/etc/apt/sources.list.d/mondodb.list",
}
Then installs a specific version:
package { mongodb-stable: ensure => "20110131" }
Unfortunately this results in the following error:
err: //Packages::Mongodb/Package[mongodb-stable]/ensure: change from
purged to 20110131 failed: Could not update: Execution of '/usr/bin/
aptitude -y -o DPkg::Options::=--force-confold --force-yes install
mongodb-stable=20110131' returned 1: /usr/bin/aptitude: unrecognized
option '--force-yes'
I believe this is caused by the following code in /usr/lib/ruby/1.8/
puppet/provider/package/apt.rb:
60 str = @resource[:name]
61 case should
62 when true, false, Symbol
63 # pass
64 else
65 # Add the package version and --force-yes option
66 str += "=#{should}"
67 cmd << "--force-yes"
68 end
So in this case, when the version was specified, it broke aptitude.
On the command line, quoting the switches line this works:
-o DPkg::Options::="--force-confold --force-yes"
However adding the quotes like this to apt.rb didn't seem to do the
trick.
I couldn't find any similar reported bugs. Has anyone else seen this
before?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.