Issue #6470 has been updated by Daniel Pittman.
LaMont Jones wrote: > In fact, if I want the uname -m output, I should be looking at the > hardwaremodel fact, and near as I can tell, architecture should just be the > output of "dpkg --print-architecture", for at least Debian and Ubuntu. > > As it sits now, the hardwaremodel fact is useful, a custom fact that is set > to the architecture from dpkg as above is useful, the architecture fact as it > sits today is not useful. I agree with this assessment, and think that "the architecture as the platform names it" is a valuable specification for this fact. ---------------------------------------- Bug #6470: Ubuntu server architecture detected as "x86_64" while it should be "amd64" https://projects.puppetlabs.com/issues/6470 Author: Dom Rivard Status: Needs more information Priority: Normal Assignee: Category: Target version: Keywords: Branch: it seems to be the same issue as this ticket [[http://projects.puppetlabs.com/issues/4980]] but with another distro<br/> We are running Ubuntu servers and the fact architecture return this: architecture => x86_64<br/> operatingsystem => Ubuntu<br/> puppetversion => 2.6.4<br/> facterversion => 1.5.8<br/> I would expect the architecture fact to return amd64<br/> in the file facter/architecture.rb<br/> # line 9 when "Debian", "Gentoo", "GNU/kFreeBSD" # I would suggest when "Debian", "Gentoo", "GNU/kFreeBSD", "Ubuntu" # it would look like this Facter.add(:architecture) do confine :kernel => [:linux, :"gnu/kfreebsd"] setcode do model = Facter.value(:hardwaremodel) case model # most linuxen use "x86_64" when "x86_64" case Facter.value(:operatingsystem) when "Debian", "Gentoo", "GNU/kFreeBSD", "Ubuntu" "amd64" else model end when /(i[3456]86|pentium)/ case Facter.value(:operatingsystem) when "Gentoo" "x86" else "i386" end else model end end end This would be helpful while installing package through dpkg and for custom build packages<br/> For now I created a custom fact to overcome this issue require 'facter' if Facter.value(:architecture) == "x86_64" packagearchitecture = "amd64" else packagearchitecture = "i386" end # # Get the DEBian package architecture that needs to be install # ex: i386, amd64 # Facter.add('packagearchitecture') do setcode do packagearchitecture end end Thank you! -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
