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

Make sure latest stable release of nginx is installed #7

Closed
drdla opened this issue Aug 26, 2012 · 9 comments
Closed

Make sure latest stable release of nginx is installed #7

drdla opened this issue Aug 26, 2012 · 9 comments

Comments

@drdla
Copy link

drdla commented Aug 26, 2012

Installing nginx with puppet-nginx on my CentOS installed nginx version 1.0.15, which is really old.
It would be nice to use the nginx-release packages listed on http://nginx.org/en/download.html (e.g. http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm for CentOS 6).

jfryman pushed a commit that referenced this issue Aug 27, 2012
@jfryman
Copy link
Contributor

jfryman commented Aug 27, 2012

Take a look at the latest push. RHEL based distros now include a Yumrepo resource that will ensure the latests version is being pulled from NGINX proper. Let me know if this works for you.

@jfryman jfryman closed this as completed Aug 27, 2012
@drdla
Copy link
Author

drdla commented Aug 28, 2012

Yes and no :-)
It WOULD solve the problem, if the variables would be interpolated properly. If I knew how to do the things listed below in Puppet, I would supply a patch, but I failed and don´t want to spend days on that.

  1. The variables OS and OSRELEASE in the baseurl 'http://nginx.org/packages/OS/OSRELEASE/$basearch/' are not interpreted at all; it´s just plain text
  2. OS must be downcased (downcase ($::operatingsystem))
  3. OSRELEASE must be the major version, so .split('.')[0].strip needs to be performed on $::operatingsystemrelease (see https://github.com/stahnma/puppet-module-epel/blob/master/lib/facter/os_maj_version.rb)

I have hardcoded those values to fix the issue for me, but obviously this is a bad hack.

@jfryman
Copy link
Contributor

jfryman commented Aug 28, 2012

@drdla Ah, okay. This is easily fixable. Give commit 721fb2f a shot, and let me know how that works. I'm not able to test, but this logic should do it.

@jfryman
Copy link
Contributor

jfryman commented Aug 28, 2012

@drdla also, there are several facter variables that prefix with 'lsb' that solve some of these issues that you've worked around to make it easier to manage.

@drdla
Copy link
Author

drdla commented Aug 28, 2012

Still struggling with it.
Baseurl is not interpolated properly. I enclosed the output.
When using double quotes:
notice: /Stage[main]/Nginx::Package::Redhat/Yumrepo[nginx-release]/baseurl: baseurl changed 'http://nginx.org/packages/centos/6/$basearch/' to 'http://nginx.org/packages/centos///'

When using single quotes:
notice: /Stage[main]/Nginx::Package::Redhat/Yumrepo[nginx-release]/baseurl: baseurl changed 'http://nginx.org/packages/centos///' to 'http://nginx.org/packages/${os_type}/${::lsbmajdistrelease}/$basearch/'

@drdla
Copy link
Author

drdla commented Aug 28, 2012

I just figured I didn´t have lsb installed.
Nevertheless, the baseurl now gets output as
http://nginx.org/packages/%24%7Bos_type%7D/%24%7B%3A%3Alsbmajdistrelease%7D/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"

@jfryman
Copy link
Contributor

jfryman commented Aug 28, 2012

I didn't properly escape the $ in the package. I've done that in a new commit.

Is that output below form the single quote (non-interpolated?) version?

@drdla
Copy link
Author

drdla commented Aug 28, 2012

It´s working now!
Thanks a lot.

@jfryman
Copy link
Contributor

jfryman commented Aug 28, 2012

Glad to hear. Sorry it took so many iterations... usually I can test and work out these bugs before release. :)

Cheers!

On Aug 28, 2012, at 3:30 PM, drdla notifications@github.com wrote:

It´s working now!
Thanks a lot.


Reply to this email directly or view it on GitHub.

cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this issue Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants