-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update alias.pp to let users of Amazon Linux use the module #545
Conversation
Fixed to all module to be used with Amazon Linux (fork of RHEL/CentOS) facter osfamily operatingsystem operatingsystem => Amazon osfamily => Linux
Can you update this commit to have a more meaningful commit message? |
@mattboston Poke |
updated |
Update alias.pp to let users of Amazon Linux use the module
@@ -1,7 +1,8 @@ | |||
class apache::mod::alias { | |||
$icons_path = $::osfamily ? { | |||
$icons_path = $::osfamily or $::operatingsystem ? { |
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...
[root@ip-10-252-105-219 ~]# rpm -i http://yum.puppetlabs.com/el/6/products/x86_64/facter-1.7.4-1.el6.x86_64.rpm
warning: /var/tmp/rpm-tmp.GLj5Jb: Header V4 RSA/SHA512 Signature, key ID 4bd6ec30: NOKEY
[root@ip-10-252-105-219 ~]# facter --version
1.7.4
[root@ip-10-252-105-219 ~]# facter operatingsystem osfamily
operatingsystem => Amazon
osfamily => RedHat
[root@ip-10-252-105-219 ~]# cat /etc/system-release
Amazon Linux AMI release 2013.09
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!
I just tested this with puppet 3.3.0 and puppet 3.4.2 and I can confirm that it doesn't work with either. (it returns true) |
Fixed to all module to be used with Amazon Linux (fork of RHEL/CentOS)
facter osfamily operatingsystem
operatingsystem => Amazon
osfamily => Linux