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

Switch from garethr/erlang->puppet/erlang #955

Closed
wants to merge 3 commits 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
3 changes: 2 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ fixtures:
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib'
apt: 'https://github.com/puppetlabs/puppetlabs-apt'
archive: 'https://github.com/voxpupuli/puppet-archive'
erlang: 'https://github.com/garethr/garethr-erlang'
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'
3 changes: 1 addition & 2 deletions examples/erlang_deps.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# install first the garethr-erlang module. See README.md
# install first the puppet/erlang module. See README.md
include erlang

class { 'erlang': epel_enable => true }
Class['erlang'] -> Class['rabbitmq']
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
18 changes: 1 addition & 17 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
context 'default class inclusion' do
let(:pp) do
<<-EOS
class { 'rabbitmq': }
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
Class['erlang'] -> Class['rabbitmq']
}
include rabbitmq
EOS
end

Expand Down Expand Up @@ -54,10 +50,6 @@
class { 'rabbitmq':
service_ensure => 'stopped',
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
Class['erlang'] -> Class['rabbitmq']
}
EOS
end

Expand All @@ -73,21 +65,13 @@
it 'runs successfully' do
pp_pre = <<-EOS
class { 'rabbitmq': }
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
Class['erlang'] -> Class['rabbitmq']
}
EOS

pp = <<-EOS
class { 'rabbitmq':
service_manage => false,
service_ensure => 'stopped',
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
Class['erlang'] -> Class['rabbitmq']
}
EOS

apply_manifest(pp_pre, catch_failures: true)
Expand Down Expand Up @@ -127,7 +111,7 @@
end

describe port(25_672) do
xit 'Is on 55672 instead on older rmq versions' do

Check warning on line 114 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq class: binding on all interfaces Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit

Check warning on line 114 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - Debian 10

rabbitmq class: binding on all interfaces Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit

Check warning on line 114 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - Ubuntu 18.04

rabbitmq class: binding on all interfaces Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit
is_expected.to be_listening.on('0.0.0.0').with('tcp')
end
end
Expand Down Expand Up @@ -162,7 +146,7 @@
# This listens on all interfaces regardless of these settings

describe port(25_672) do
xit 'Is on 55672 instead on older rmq versions' do

Check warning on line 149 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq class: binding to localhost only Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit

Check warning on line 149 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - Debian 10

rabbitmq class: binding to localhost only Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit

Check warning on line 149 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - Ubuntu 18.04

rabbitmq class: binding to localhost only Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit
is_expected.to be_listening.on('0.0.0.0').with('tcp')
end
end
Expand Down Expand Up @@ -227,7 +211,7 @@
end

describe port(25_672) do
xit 'Is on 55672 instead on older rmq versions' do

Check warning on line 214 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq class: different management_ip_address and node_ip_address Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit

Check warning on line 214 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - Debian 10

rabbitmq class: different management_ip_address and node_ip_address Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit

Check warning on line 214 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - Ubuntu 18.04

rabbitmq class: different management_ip_address and node_ip_address Port "25672" Is on 55672 instead on older rmq versions Skipped: Temporarily skipped with xit
is_expected.to be_listening.on('0.0.0.0').with('tcp')
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/acceptance/clustering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
wipe_db_on_cookie_change => false,
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
EOS
Expand All @@ -29,7 +29,7 @@
end

context 'rabbitmq::wipe_db_on_cookie_change => true' do
it 'runs successfully' do

Check failure on line 32 in spec/acceptance/clustering_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq clustering rabbitmq::wipe_db_on_cookie_change => true runs successfully Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'centos7-64-puppet7.example.com' exited with 4 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_123208293.pp.xqaSnj Last 10 lines of output were: Warning: /Stage[main]/Rabbitmq::Config/Systemd::Manage_dropin[service-90-limits.conf]/Systemd::Dropin_file[service-90-limits.conf]/File[/etc/systemd/system/rabbitmq-server.service.d]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Config/Systemd::Manage_dropin[service-90-limits.conf]/Systemd::Dropin_file[service-90-limits.conf]/File[/etc/systemd/system/rabbitmq-server.service.d/service-90-limits.conf]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Config/Systemd::Manage_dropin[service-90-limits.conf]/Systemd::Dropin_file[service-90-limits.conf]/Systemd::Daemon_reload[rabbitmq-server.service]/Exec[systemd-rabbitmq-server.service-systemctl-daemon-reload]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Package[python]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[remove_old_rabbitmqadmin_on_upgrade]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Archive[rabbitmqadmin]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq/Rabbitmq_cluster[rabbit_cluster]: Skipping because of failed dependencies �[mNotice: Applied catalog in 4.10 seconds
pp = <<-EOS
class { 'rabbitmq':
cluster => { 'name' => 'rabbit_cluster', 'init_node' => $facts['fqdn'] },
Expand All @@ -40,7 +40,7 @@
wipe_db_on_cookie_change => true,
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
EOS
Expand All @@ -50,20 +50,20 @@

describe file('/etc/rabbitmq/rabbitmq.config') do
it { is_expected.to be_file }
it { is_expected.to contain 'cluster_nodes' }

Check failure on line 53 in spec/acceptance/clustering_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq clustering rabbitmq::wipe_db_on_cookie_change => true File "/etc/rabbitmq/rabbitmq.config" is expected to contain "cluster_nodes" Failure/Error: it { is_expected.to contain 'cluster_nodes' } expected File "/etc/rabbitmq/rabbitmq.config" to contain "cluster_nodes"
it { is_expected.to contain 'rabbit@rabbit1' }

Check failure on line 54 in spec/acceptance/clustering_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq clustering rabbitmq::wipe_db_on_cookie_change => true File "/etc/rabbitmq/rabbitmq.config" is expected to contain "rabbit@rabbit1" Failure/Error: it { is_expected.to contain 'rabbit@rabbit1' } expected File "/etc/rabbitmq/rabbitmq.config" to contain "rabbit@rabbit1"
it { is_expected.to contain 'rabbit@rabbit2' }

Check failure on line 55 in spec/acceptance/clustering_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq clustering rabbitmq::wipe_db_on_cookie_change => true File "/etc/rabbitmq/rabbitmq.config" is expected to contain "rabbit@rabbit2" Failure/Error: it { is_expected.to contain 'rabbit@rabbit2' } expected File "/etc/rabbitmq/rabbitmq.config" to contain "rabbit@rabbit2"
it { is_expected.to contain 'ram' }

Check failure on line 56 in spec/acceptance/clustering_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq clustering rabbitmq::wipe_db_on_cookie_change => true File "/etc/rabbitmq/rabbitmq.config" is expected to contain "ram" Failure/Error: it { is_expected.to contain 'ram' } expected File "/etc/rabbitmq/rabbitmq.config" to contain "ram"
end

describe file('/var/lib/rabbitmq/.erlang.cookie') do
it { is_expected.to be_file }
it { is_expected.to contain 'TESTCOOKIE' }

Check failure on line 61 in spec/acceptance/clustering_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq clustering rabbitmq::wipe_db_on_cookie_change => true File "/var/lib/rabbitmq/.erlang.cookie" is expected to contain "TESTCOOKIE" Failure/Error: it { is_expected.to contain 'TESTCOOKIE' } expected File "/var/lib/rabbitmq/.erlang.cookie" to contain "TESTCOOKIE"
end

describe 'rabbitmq_cluster' do
context 'cluster_name => rabbit_cluster' do
it 'cluster has name' do

Check failure on line 66 in spec/acceptance/clustering_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq clustering rabbitmq::wipe_db_on_cookie_change => true rabbitmq_cluster cluster_name => rabbit_cluster cluster has name Failure/Error: expect(r.stdout).to match(%r!({cluster_name,<<"rabbit_cluster">>}|^Cluster name: rabbit_cluster$)!) expected "[{nodes,[{disc,['rabbit@centos7-64-puppet7']}]},\n {running_nodes,['rabbit@centos7-64-puppet7']},\n {cluster_name,<<\"[email protected]\">>},\n {partitions,[]}]\n" to match /({cluster_name,<<"rabbit_cluster">>}|^Cluster name: rabbit_cluster$)/ Diff: @@ -1,4 +1,7 @@ -/({cluster_name,<<"rabbit_cluster">>}|^Cluster name: rabbit_cluster$)/ +[{nodes,[{disc,['rabbit@centos7-64-puppet7']}]}, + {running_nodes,['rabbit@centos7-64-puppet7']}, + {cluster_name,<<"[email protected]">>}, + {partitions,[]}]
shell('rabbitmqctl -q cluster_status') do |r|
expect(r.stdout).to match(%r!({cluster_name,<<"rabbit_cluster">>}|^Cluster name: rabbit_cluster$)!)
expect(r.exit_code).to be_zero
Expand All @@ -85,7 +85,7 @@
erlang_cookie => 'TESTCOOKIE',
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
EOS
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/delete_guest_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

describe 'rabbitmq with delete_guest_user' do
context 'delete_guest_user' do
it 'runs successfully' do

Check failure on line 7 in spec/acceptance/delete_guest_user_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq with delete_guest_user delete_guest_user runs successfully Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'centos7-64-puppet7.example.com' exited with 4 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_123222744.pp.sgESl4 Last 10 lines of output were: Warning: /Stage[main]/Rabbitmq::Config/Systemd::Manage_dropin[service-90-limits.conf]/Systemd::Dropin_file[service-90-limits.conf]/File[/etc/systemd/system/rabbitmq-server.service.d]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Config/Systemd::Manage_dropin[service-90-limits.conf]/Systemd::Dropin_file[service-90-limits.conf]/File[/etc/systemd/system/rabbitmq-server.service.d/service-90-limits.conf]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Config/Systemd::Manage_dropin[service-90-limits.conf]/Systemd::Dropin_file[service-90-limits.conf]/Systemd::Daemon_reload[rabbitmq-server.service]/Exec[systemd-rabbitmq-server.service-systemctl-daemon-reload]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Package[python]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[remove_old_rabbitmqadmin_on_upgrade]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Archive[rabbitmqadmin]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies �[mNotice: Applied catalog in 7.20 seconds
pp = <<-EOS
class { 'rabbitmq':
port => 5672,
delete_guest_user => true,
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
EOS
Expand All @@ -21,7 +21,7 @@
end

describe file('/tmp/rabbitmqctl_users') do
it { is_expected.to be_file }

Check failure on line 24 in spec/acceptance/delete_guest_user_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq with delete_guest_user delete_guest_user File "/tmp/rabbitmqctl_users" is expected to be file Failure/Error: it { is_expected.to be_file } expected `File "/tmp/rabbitmqctl_users".file?` to be truthy, got false
it { is_expected.not_to contain 'guest' }
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/parameter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

describe 'rabbitmq parameter on a vhost:' do
context 'create parameter resource' do
it 'runs successfully' do

Check failure on line 7 in spec/acceptance/parameter_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 7 - CentOS 7

rabbitmq parameter on a vhost: create parameter resource runs successfully Failure/Error: apply_manifest(pp, catch_failures: true) Beaker::Host::CommandFailure: Host 'centos7-64-puppet7.example.com' exited with 4 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_123232881.pp.9FAI19 Last 10 lines of output were: Warning: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Management/Rabbitmq_user[guest]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Package[python]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Exec[remove_old_rabbitmqadmin_on_upgrade]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/Archive[rabbitmqadmin]: Skipping because of failed dependencies Warning: /Stage[main]/Rabbitmq::Install::Rabbitmqadmin/File[/usr/local/bin/rabbitmqadmin]: Skipping because of failed dependencies Warning: /Stage[main]/Main/Rabbitmq_vhost[fedhost]: Skipping because of failed dependencies Info: Calling prefetch: documentumFed@fedhost Warning: /Stage[main]/Main/Rabbitmq_parameter[documentumFed@fedhost]: Skipping because of failed dependencies �[mNotice: Applied catalog in 3.55 seconds
pp = <<-EOS
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true }
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
class { 'rabbitmq':
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/policy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
it 'runs successfully' do
pp = <<-EOS
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true }
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
class { 'rabbitmq':
Expand Down
6 changes: 3 additions & 3 deletions spec/acceptance/queue_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
it 'runs successfully' do
pp = <<-EOS
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true }
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
class { 'rabbitmq':
Expand Down Expand Up @@ -81,7 +81,7 @@ class { 'rabbitmq':
it 'runs successfully' do
pp = <<-EOS
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true }
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
class { 'rabbitmq':
Expand Down Expand Up @@ -169,7 +169,7 @@ class { 'rabbitmq':
it 'runs successfully' do
pp = <<-EOS
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true }
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
class { 'rabbitmq':
Expand Down
8 changes: 4 additions & 4 deletions spec/acceptance/rabbitmqadmin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class { 'rabbitmq':
service_manage => true,
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
EOS
Expand All @@ -32,7 +32,7 @@ class { 'rabbitmq':
service_manage => false,
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
EOS
Expand All @@ -56,7 +56,7 @@ class { 'rabbitmq':
default_pass => 'bazblam',
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
EOS
Expand All @@ -69,7 +69,7 @@ class { 'rabbitmq':
default_pass => 'bazblam',
}
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true}
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
EOS
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
it 'runs successfully' do
pp = <<-EOS
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true }
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
class { 'rabbitmq':
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
it 'runs successfully' do
pp = <<-EOS
if $facts['os']['family'] == 'RedHat' {
class { 'erlang': epel_enable => true }
class { 'erlang': }
Class['erlang'] -> Class['rabbitmq']
}
class { 'rabbitmq':
Expand Down
3 changes: 2 additions & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
when 'Debian'
install_puppet_module_via_pmt_on(host, 'puppetlabs-apt', '>= 4.1.0 < 9.0.0')
when 'RedHat'
install_puppet_module_via_pmt_on(host, 'garethr-erlang', '>= 0.3.0 < 1.0.0')
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