Ask Your Question

How do I determine the OS type and if it is 32 or 64 bit?

asked 2014-09-25 12:24:13 -0600

GLN gravatar image

updated 2014-09-25 12:41:34 -0600


I have a task to run an installer on all sorts of machines. I got to the point in which I am able to copy files and execute them and now have the following challenge: I am not sure what's on the other side? from a process stand point I don't always know what kind of linux it is or if it is windows, I don't know if it is 32 bit or 64 bit? I want to be able to deploy my class to the target environment and that it will determine the os vendor and if it is 32 or 64 bit and according to that copy and execute the right rile?

Have anybody done something similar or know how I can determine the OS and 32/64 bit from a puppet class?

Thanks GLN

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-25 14:42:42 -0600

llowder gravatar image

For the OS, you can use the os, osfamily or, operatingsystem facts, depending on which information you need and how granular you need it.

For 32bit vs 64bit, use the architecture fact.

For a full list of facts, check out the docs.

If you are not using the latest facter, change latest to 1.6 or 1.7 etc as appropriate in the above URLs.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-09-25 12:24:13 -0600

Seen: 832 times

Last updated: Sep 25 '14