-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
Replace add_listen_directive
with nginx_version
#1330
Conversation
add_listen_directive
with nginx_version
If this looks half way reasonable, I'll see about adding an extra test or two. |
Nginx 1.16 has recently been released. Instead of updating the README to recommend users set the `add_listen_directive` parameter, this parameter has been replaced by an `nginx_version` parameter that defaults to the fact (if available). If the fact isn't available, it defaults to a very conservative `1.6.0` (the version that ships in Debian 8). Future enhancements could make the non-fact default be OS specific.
@@ -24,6 +24,14 @@ | |||
# node default { | |||
# include nginx | |||
# } | |||
# | |||
# @param nginx_version | |||
# The version of nginx installed (or being installed). |
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.
language shameless borrowed from one of theforeman/puppet parameters ;)
add_listen_directive
with nginx_version
add_listen_directive
with nginx_version
# The version of nginx installed (or being installed). | ||
# Unfortunately, different versions of nginx may need configuring | ||
# differently. The default is derived from the version of nginx | ||
# already installed. If the fact is unavailable, it defaults to '1.6.0'. |
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.
1.6.0
? Did you mean 1.16.0
?
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.
No, that wasn't a typo. See commit message or #1330 (comment) I wanted to pick a number < 1.15.0 and beyond that it didn't really matter what. Debian 8 is a supported OS that ships with 1.6.x, so that seemed as good as any other to go with.
Maybe in a separate PR you might want to implement some of
Future enhancements could make the non-fact default be OS specific.
@@ -185,7 +193,7 @@ | |||
Hash $nginx_upstreams = {}, | |||
Nginx::UpstreamDefaults $nginx_upstreams_defaults = {}, | |||
Boolean $purge_passenger_repo = true, | |||
Boolean $add_listen_directive = $nginx::params::add_listen_directive, | |||
String[1] $nginx_version = pick(fact('nginx_version'), '1.6.0'), |
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.
1.6.0
? Did you mean 1.16.0
?
Replace `add_listen_directive` with `nginx_version`
Nginx 1.16 has recently been released. Instead of updating the README
to recommend users set the
add_listen_directive
parameter, thisparameter has been replaced by an
nginx_version
parameter thatdefaults to the fact (if available). If the fact isn't available, it
defaults to a very conservative
1.6.0
(the version that ships in Debian8). Future enhancements could make the non-fact default be OS specific.