Skip to content

Commit ac1759a

Browse files
committed
CentOS7: Install EPEL or upstream repos
1 parent 3af209f commit ac1759a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.fixtures.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ fixtures:
55
archive: 'https://github.com/voxpupuli/puppet-archive'
66
erlang: 'https://github.com/voxpupuli/puppet-erlang'
77
systemd: 'https://github.com/voxpupuli/puppet-systemd'
8+
epel: 'https://github.com/voxpupuli/puppet-epel'
89
yumrepo_core: 'https://github.com/puppetlabs/puppetlabs-yumrepo_core'

manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,8 @@
492492
}
493493
}
494494

495+
# when repos_ensure is true, we configure externel repos
496+
# CentOS 7 doesn't contain rabbitmq. It's only in EPEL.
495497
if $repos_ensure {
496498
case $facts['os']['family'] {
497499
'RedHat': {
@@ -505,6 +507,8 @@
505507
default: {
506508
}
507509
}
510+
} elsif ($facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7') {
511+
require epel
508512
}
509513

510514
contain rabbitmq::install

spec/spec_helper_acceptance.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
install_puppet_module_via_pmt_on(host, 'puppetlabs-apt', '>= 4.1.0 < 9.0.0')
99
when 'RedHat'
1010
install_puppet_module_via_pmt_on(host, 'puppet-erlang', '>= 1.1.0 < 2.0.0')
11+
install_puppet_module_via_pmt_on(host, 'puppet-epel', '>= 5.0.0 < 6.0.0')
1112
if fact_on(host, 'os.selinux.enabled')
1213
# Make sure selinux is disabled so the tests work.
1314
on host, puppet('resource', 'exec', 'setenforce 0', 'path=/bin:/sbin:/usr/bin:/usr/sbin', 'onlyif=which setenforce && getenforce | grep Enforcing')

0 commit comments

Comments
 (0)