Skip to content

Commit 67bace5

Browse files
committed
Add support for CentOS/RHEL 8
1 parent fd25406 commit 67bace5

File tree

7 files changed

+68
-12
lines changed

7 files changed

+68
-12
lines changed

.github/SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Vox Pupuli Security Policy
2+
3+
Our vulnerabilities reporting process is at https://voxpupuli.org/security/

.sync.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
- set: ubuntu1804-64
99
- set: centos6-64
1010
- set: centos7-64
11+
# RabbitMQ fails to start via systemd unless /sys/fs/cgroup is mounted through from to base host
12+
- set: centos8-64{mount_folders={sysfscgroup={host_path=/sys/fs/cgroup\,container_path=/sys/fs/cgroup\,opts=ro}}}
1113
appveyor.yml:
1214
delete: true
1315
spec/spec_helper.rb:

.travis.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
os: linux
23
dist: bionic
34
language: ruby
45
cache: bundler
@@ -7,7 +8,7 @@ before_install:
78
- bundle --version
89
script:
910
- 'bundle exec rake $CHECK'
10-
matrix:
11+
jobs:
1112
fast_finish: true
1213
include:
1314
- rvm: 2.4.4
@@ -70,6 +71,14 @@ matrix:
7071
bundler_args: --without development release
7172
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=centos7-64 CHECK=beaker
7273
services: docker
74+
- rvm: 2.5.3
75+
bundler_args: --without development release
76+
env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=centos8-64{mount_folders={sysfscgroup={host_path=/sys/fs/cgroup\,container_path=/sys/fs/cgroup\,opts=ro}}} CHECK=beaker
77+
services: docker
78+
- rvm: 2.5.3
79+
bundler_args: --without development release
80+
env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=centos8-64{mount_folders={sysfscgroup={host_path=/sys/fs/cgroup\,container_path=/sys/fs/cgroup\,opts=ro}}} CHECK=beaker
81+
services: docker
7382
branches:
7483
only:
7584
- master
@@ -84,7 +93,7 @@ notifications:
8493
- "chat.freenode.org#voxpupuli-notifications"
8594
deploy:
8695
provider: puppetforge
87-
user: puppet
96+
username: puppet
8897
password:
8998
secure: "Ojc0h2mbt9Y+eCyiKD+x1iYNONOP27Me63hjo9jo2v1bSs3aiM7djlcpz/sG+jRJ7JQoUyaGzHSn+gvxwWqdagFfFgDmipMKD0OXQinq7upRaG2hR+akKo0jllq9zLjJGBDoxurioKfOzPGlt2bX3UYY5KyeJ3AIM4dwCGVtSh4="
9099
on:

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def location_for(place, fake_version = nil)
1111
end
1212

1313
group :test do
14-
gem 'voxpupuli-test', '>= 1.0.0', :require => false
14+
gem 'voxpupuli-test', '>= 1.4.0', :require => false
1515
gem 'coveralls', :require => false
1616
gem 'simplecov-console', :require => false
1717
end

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
4. [Usage - Configuration options and additional functionality](#usage)
1919
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
2020
5. [Limitations - OS compatibility, etc.](#limitations)
21-
* [RedHat module dependencies](#redhat-module-dependecies)
2221
6. [Development - Guide for contributing to the module](#development)
2322

2423
## Overview
@@ -54,6 +53,38 @@ You can view example usage in [REFERENCE](REFERENCE.md).
5453

5554
See [REFERENCE](REFERENCE.md).
5655

56+
## Limitations
57+
58+
If running CentOS/RHEL, ensure the `epel` repo, or another repo containing a
59+
suitable Erlang version, is present. On Debian systems, puppetlabs/apt
60+
(>=2.0.0 < 5.0.0) is a soft dependency.
61+
62+
To have a suitable erlang version installed on RedHat and Debian systems,
63+
you have to install another puppet module from https://forge.puppetlabs.com/garethr/erlang with:
64+
65+
puppet module install garethr-erlang
66+
67+
This module handles the packages for erlang.
68+
To use the module, add the following snippet to your site.pp or an appropriate profile class:
69+
70+
For RedHat systems:
71+
```puppet
72+
include 'erlang'
73+
class { 'erlang':
74+
epel_enable => true,
75+
}
76+
```
77+
78+
For Debian systems:
79+
```puppet
80+
include 'erlang'
81+
package { 'erlang-base':
82+
ensure => 'latest',
83+
}
84+
```
85+
86+
This module also depends on voxpupuli/archive to install rabbitmqadmin.
87+
5788
## Development
5889

5990
This module is maintained by [Vox Pupuli](https://voxpupuli.org/). Voxpupuli

metadata.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
"operatingsystem": "RedHat",
1313
"operatingsystemrelease": [
1414
"6",
15-
"7"
15+
"7",
16+
"8"
1617
]
1718
},
1819
{
1920
"operatingsystem": "CentOS",
2021
"operatingsystemrelease": [
2122
"6",
22-
"7"
23+
"7",
24+
"8"
2325
]
2426
},
2527
{

spec/classes/rabbitmq_spec.rb

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,19 @@
185185

186186
context 'with service_manage set to true' do
187187
let(:params) { { admin_enable: true, management_ip_address: '1.1.1.1', service_manage: true } }
188+
let(:python_package) do
189+
if %w[Debian SUSE].include?(facts[:os]['family'])
190+
'python'
191+
elsif %w[FreeBSD OpenBSD].include?(facts[:os]['family'])
192+
'python2'
193+
elsif facts[:os]['family'] == 'RedHat'
194+
if facts[:os]['release']['major'] == '8'
195+
'python3'
196+
else
197+
'python'
198+
end
199+
end
200+
end
188201

189202
context 'with rabbitmqadmin_package set to blub' do
190203
let(:params) { { rabbitmqadmin_package: 'blub' } }
@@ -206,12 +219,7 @@
206219
is_expected.to contain_archive('rabbitmqadmin').with_source('http://1.1.1.1:15672/cli/rabbitmqadmin')
207220
end
208221
end
209-
if %w[RedHat Debian SUSE].include?(facts[:os]['family'])
210-
it { is_expected.to contain_package('python') }
211-
end
212-
if %w[FreeBSD OpenBSD].include?(facts[:os]['family'])
213-
it { is_expected.to contain_package('python2') }
214-
end
222+
it { is_expected.to contain_package(python_package) if python_package }
215223
end
216224
context 'with manage_python false' do
217225
let(:params) { { manage_python: false } }
@@ -220,6 +228,7 @@
220228
is_expected.to contain_class('rabbitmq::install::rabbitmqadmin')
221229
is_expected.not_to contain_package('python')
222230
is_expected.not_to contain_package('python2')
231+
is_expected.not_to contain_package('python3')
223232
end
224233
end
225234

0 commit comments

Comments
 (0)