Skip to content

Commit

Permalink
CentOS7: Install EPEL or upstream repos
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed May 19, 2024
1 parent 3af209f commit ac1759a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ fixtures:
archive: 'https://github.com/voxpupuli/puppet-archive'
erlang: 'https://github.com/voxpupuli/puppet-erlang'
systemd: 'https://github.com/voxpupuli/puppet-systemd'
epel: 'https://github.com/voxpupuli/puppet-epel'
yumrepo_core: 'https://github.com/puppetlabs/puppetlabs-yumrepo_core'
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,8 @@
}
}

# when repos_ensure is true, we configure externel repos
# CentOS 7 doesn't contain rabbitmq. It's only in EPEL.
if $repos_ensure {
case $facts['os']['family'] {
'RedHat': {
Expand All @@ -505,6 +507,8 @@
default: {
}
}
} elsif ($facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7') {
require epel
}

contain rabbitmq::install
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
install_puppet_module_via_pmt_on(host, 'puppetlabs-apt', '>= 4.1.0 < 9.0.0')
when 'RedHat'
install_puppet_module_via_pmt_on(host, 'puppet-erlang', '>= 1.1.0 < 2.0.0')
install_puppet_module_via_pmt_on(host, 'puppet-epel', '>= 5.0.0 < 6.0.0')
if fact_on(host, 'os.selinux.enabled')
# Make sure selinux is disabled so the tests work.
on host, puppet('resource', 'exec', 'setenforce 0', 'path=/bin:/sbin:/usr/bin:/usr/sbin', 'onlyif=which setenforce && getenforce | grep Enforcing')
Expand Down

0 comments on commit ac1759a

Please sign in to comment.