Skip to content
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

Merged
merged 1 commit into from
Jan 27, 2014
Merged

Update alias.pp to let users of Amazon Linux use the module #545

merged 1 commit into from
Jan 27, 2014

Conversation

mattboston
Copy link
Contributor

Fixed to all module to be used with Amazon Linux (fork of RHEL/CentOS)

facter osfamily operatingsystem
operatingsystem => Amazon
osfamily => Linux

Fixed to all module to be used with Amazon Linux (fork of RHEL/CentOS)

facter osfamily operatingsystem
operatingsystem => Amazon
osfamily => Linux
@igalic
Copy link
Contributor

igalic commented Dec 20, 2013

Can you update this commit to have a more meaningful commit message?

@blkperl
Copy link
Contributor

blkperl commented Jan 26, 2014

@mattboston Poke

@mattboston
Copy link
Contributor Author

updated

igalic added a commit that referenced this pull request Jan 27, 2014
Update alias.pp to let users of Amazon Linux use the module
@igalic igalic merged commit a9017af into puppetlabs:master Jan 27, 2014
@@ -1,7 +1,8 @@
class apache::mod::alias {
$icons_path = $::osfamily ? {
$icons_path = $::osfamily or $::operatingsystem ? {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa! This works?

Copy link
Contributor

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."

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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!

@igalic
Copy link
Contributor

igalic commented Jan 27, 2014

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants