Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa! This works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to http://docs.puppetlabs.com/puppet/latest/reference/lang_conditional.html#control-variables "You cannot use expressions as control variables."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does. That's fine if you don't do it this way, but you need to add support for Amazon Linux since it's becoming a significant distribution in the cloud whatever the proper way is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gist.github.com/casharma/cd40b7ed82c7fd9b4659 Doesn't seem to indicate that. What version of puppet are you using?
Also, Amazon Linux is osfamily RedHat since facter 1.7.0 (10 months old) specifically to avoid having to add a bunch of these to modules. What version of facter are you using?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically you are correct it's built off RHEL, but they are not working like a RHEL/CentOS system. Every single Forge package I've tried to use that has used osfamily = redhat or operatingsystem = Centos does not work (or at least didn't). Is it possible at some point something changed in the Amazon Linux AMI that broke Facter or Facter had a bug? Just a few weeks back operatingsystem was = to Linux on Amazon Linux.
[root@puppet ~]# facter operatingsystem
Amazon
[root@puppet ~]# facter osfamily
RedHat
[root@puppet ~]# cat /etc/system-release
Amazon Linux AMI release 2013.09
[root@puppet ~]# rpm -qa | egrep "puppet|facter"
puppetlabs-release-6-10.noarch
rubygem-puppet-lint-doc-0.3.2-1.el6.noarch
puppet-server-3.4.2-1.el6.noarch
rubygem-puppet-lint-0.3.2-1.el6.noarch
facter-1.7.4-1.el6.x86_64
puppet-3.4.2-1.el6.noarch
puppet-dashboard-1.2.23-1.el6.noarch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're better off installing puppet/facter from yum.puppetlabs.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are installed directly from PuppetLab's Yum repo. The original commit message has the output of facter from my working systems which showed that PuppetLab's Facter was reporting the following.
facter osfamily operatingsystem
operatingsystem => Amazon
osfamily => Linux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is up...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this: theforeman/puppet-apache#9
When the systems were setup, they must have been on an older version of Facter because I'm not seeing the problem now. Feel free to reject the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this!