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

Replace add_listen_directive with nginx_version #1330

Merged
merged 2 commits into from
May 11, 2019

Conversation

alexjfisher
Copy link
Member

@alexjfisher alexjfisher commented May 8, 2019

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.

@alexjfisher alexjfisher changed the title WIP: Fix acceptance tests broken since nginx 1.16 WIP: Replace add_listen_directive with nginx_version May 8, 2019
@alexjfisher
Copy link
Member Author

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).
Copy link
Member Author

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 ;)

@alexjfisher alexjfisher changed the title WIP: Replace add_listen_directive with nginx_version Replace add_listen_directive with nginx_version May 8, 2019
# 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'.
Copy link
Member

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?

Copy link
Member Author

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'),
Copy link
Member

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?

@bastelfreak bastelfreak merged commit 8de2abe into voxpupuli:master May 11, 2019
Rubueno pushed a commit to Rubueno/puppet-nginx that referenced this pull request Oct 19, 2020
Replace `add_listen_directive` with `nginx_version`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants