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

add support for passenger on CentOS/RHEL #786

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Gemfile.lock
spec/fixtures/modules
spec/fixtures/manifests
vendor
.bundle
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't need any changes to gitignore for this update

Copy link
Member

Choose a reason for hiding this comment

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

.gitignore is also managed centrally using modulesync

.ruby-version
.vagrant/
4 changes: 1 addition & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ nginx::nginx_mailhosts:

## Nginx with precompiled Passenger

Currently this works only for Debian family and OpenBSD.

On Debian it might look like:
On Debian and CentOS it might look like:
```puppet
class { 'nginx':
package_source => 'passenger',
Expand Down
18 changes: 17 additions & 1 deletion manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,24 @@
before => Package['nginx'],
}
}
'passenger': {
yumrepo { 'passenger':
baseurl => "https://oss-binaries.phusionpassenger.com/yum/passenger/el/${::operatingsystemmajrelease}/\$basearch",
descr => 'passenger repo',
enabled => '1',
gpgcheck => '1',
priority => '1',
gpgkey => 'https://packagecloud.io/gpg.key',
before => Package['nginx'],
}

package { 'passenger':
ensure => 'present',
require => Yumrepo['passenger'],
}
}
default: {
fail("\$package_source must be 'nginx-stable' or 'nginx-mainline'. It was set to '${package_source}'")
fail("\$package_source must be 'nginx-stable', 'nginx-mainline', or 'passenger'. It was set to '${package_source}'")
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions spec/classes/package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
)}
end

context "package_source => passenger" do
let(:params) {{ :package_source => 'passenger' }}
it { is_expected.to contain_yumrepo('passenger').with(
'baseurl' => 'https://oss-binaries.phusionpassenger.com/yum/passenger/el/6/$basearch',
)}
it { is_expected.to contain_package('passenger') }
end

context "manage_repo => false" do
let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'RedHat', :operatingsystemmajrelease => '7' }}
let(:params) {{ :manage_repo => false }}
Expand Down