Skip to content

Instantly share code, notes, and snippets.

@alvarobp
Created August 3, 2011 10:14
Show Gist options
  • Save alvarobp/1122327 to your computer and use it in GitHub Desktop.
Save alvarobp/1122327 to your computer and use it in GitHub Desktop.
[Chef] Check node architecture
case node[:languages][:ruby][:host_cpu]
when "x86_64"
when "i686"
end
@dragon788
Copy link

Also handy is using #{ 'amd64' if node['kernel']['machine'] == 'x86_64' else 'i386'} if you were attempting to replicate ${ARCH} as described in many shell scripts when trying to download the right deb/rpm/etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment