puppetlabs/facter — pull request #129 by mv (2011-12-30 13:38:36+00:00)
Title: (#10271) Identifying 'Amazon' using '/etc/system-release'

Hi,

I had some problems executing facter in my instance of Amazon Linux 2011.09 and I discovered this bug in your list of issues.

This fix I am sending worked nicely for me.

Best,

Marcus

command line results:
[ec2-user@ip-10-228-1-2 ~]$ cat /etc/system-release
Amazon Linux AMI release 2011.09

[ec2-user@ip-10-228-1-2 ~]$ facter | grep oper
operatingsystem => Amazon
operatingsystemrelease => 2.6.35.14-97.44.amzn1.x86_64

rspec results:

[ec2-user@ip-10-228-1-2 ~]$ rspec -f d spec/unit/operatingsystem_spec.rb
Operating System fact
should default to the kernel name
should be Solaris for SunOS
should be ESXi for VMkernel
on Linux
...
should be Amazon if /etc/system-release exists
...