-
-
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
Clean up package classes, allow installing mainline upstream packages #519
Conversation
* Removed some tests that no longer apply and/or are redundant * Only set OS facts when testing OS-specific behaviors. This simplifies the facts that must be set in the specs and saves running the same tests several times when the results wouldn't differ by OS anyway.
Upstream doesn't provide a build of Nginx for Amazon Linux.
default: { | ||
fail("Module ${module_name} is not supported on ${::operatingsystem}") | ||
} | ||
package { $package_name: |
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.
Whoops, missed this during a rebase - I need to change this to package { 'nginx':
I'll fix tonight, so don't merge just yet.
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 worries. This was a big one, and I figured you'll merge when you're ready. Good 👀
This will provide broader OS compatibility without having to manually add support for specific OSes.
Those versions no longer supported by the Fedora Project.
Even if they're currently identical they may diverge in future.
i.e. upstream provides a package for it
The comments say this must be set on that OS so the failure makes that explicit.
The file wouldn't necessarily be at that location. According to Puppet it's installed in the first matching location: * Custom directory specified by the ‘/etc/yum.conf’ reposdir property * ‘/etc/yum/repos.d’ * ‘/etc/yum.repos.d’ * If none of these locations match, section will be created in ‘/etc/yum.conf’
* puppetlabs-apt does an APT update after every apt::source is added, so no need to do it again in this module. * Use the 'required_packages' feature of apt::source instead of ensure_resources
Required per the Passenger install guide
According to Passenger docs: "You should install nginx-extras even if you have already installed an Nginx package from the official Debian/Ubuntu repository. This is because the Nginx binary that our packages supply is compiled with the Passenger module."
I'll treasure that GIF forever :) I'll let this sit until the end of the weekend, barring any negative feedback or comments I'll merge then. |
Clean up package classes, allow installing mainline upstream packages
Clean up package classes, allow installing mainline upstream packages
Improves the way packages are handled by the module and cleans up the code significantly. No features are removed except with good reason, and it should be almost completely compatible with existing code (except for the
package
resource now always being called "nginx", and removing a couple of resources that were only for internal use).manage_repo => true
when appropriate (i.e. upstream provides a package for it)$package_name
not set. The comments say this must be set on that OS so the failure makes that explicit.yumrepo
resource will do the right thing.apt::source
.apt::source
. This is required according to the Passenger documentation.