Skip to content

Commit de0acd2

Browse files
committed
Remove garethr/erlang dependency
Most of the distributions handle the erlang installation automatically. The garethr/erlang dependency is not needed there and can be added manually in case it's needed.
1 parent 2c0f33b commit de0acd2

File tree

9 files changed

+20
-29
lines changed

9 files changed

+20
-29
lines changed

Modulefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ project_page 'http://github.com/puppetlabs/puppetlabs-rabbitmq'
1010
## Add dependencies, if any:
1111
dependency 'puppetlabs/stdlib', '>= 2.0.0'
1212
dependency 'puppetlabs/apt', '>= 1.0.0'
13-
dependency 'garethr/erlang', '>= 0.1.0'
1413
dependency 'nanliu/staging', '>= 0.3.1'

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
4. [Usage - Configuration options and additional functionality](#usage)
1212
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
1313
5. [Limitations - OS compatibility, etc.](#limitations)
14+
* [RedHat module dependencies](#redhat-module-dependecies)
1415
6. [Development - Guide for contributing to the module](#development)
1516

1617
##Overview
@@ -315,6 +316,19 @@ The module has been tested on:
315316

316317
Testing on other platforms has been light and cannot be guaranteed.
317318

319+
### RedHat module dependencies
320+
To have a suitable erlang version installed on RedHat systems,
321+
you have to install another puppet module from http://forge.puppetlabs.com/garethr/erlang with:
322+
323+
puppet module install garethr-erlang
324+
325+
This module handles the packages for erlang.
326+
To use the module, add the following snippet to your site.pp or an appropriate profile class:
327+
328+
include 'erlang'
329+
class { 'erlang': epel_enable => true}
330+
Class['erlang'] -> Class['rabbitmq']
331+
318332
##Development
319333

320334
Puppet Labs modules on the Puppet Forge are open projects, and community

manifests/init.pp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
$env_config = $rabbitmq::params::env_config,
1616
$env_config_path = $rabbitmq::params::env_config_path,
1717
$erlang_cookie = $rabbitmq::params::erlang_cookie,
18-
$erlang_manage = $rabbitmq::params::erlang_manage,
1918
$manage_service = $rabbitmq::params::manage_service,
2019
$management_port = $rabbitmq::params::management_port,
2120
$node_ip_address = $rabbitmq::params::node_ip_address,
@@ -54,7 +53,6 @@
5453
) inherits rabbitmq::params {
5554

5655
validate_bool($admin_enable)
57-
validate_bool($erlang_manage)
5856
# Validate install parameters.
5957
validate_re($package_apt_pin, '^(|\d+)$')
6058
validate_string($package_ensure)
@@ -107,11 +105,6 @@
107105
validate_hash($config_variables)
108106
validate_hash($config_kernel_variables)
109107

110-
if $erlang_manage {
111-
include '::erlang'
112-
Class['::erlang'] -> Class['::rabbitmq::install']
113-
}
114-
115108
include '::rabbitmq::install'
116109
include '::rabbitmq::config'
117110
include '::rabbitmq::service'

manifests/params.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
#install
4141
$admin_enable = true
42-
$erlang_manage = false
4342
$management_port = '15672'
4443
$package_apt_pin = ''
4544
$package_gpg_key = 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc'

spec/classes/rabbitmq_spec.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,6 @@
7676
end
7777
end
7878

79-
context 'with erlang_manage set to true' do
80-
let(:params) {{ :erlang_manage => true }}
81-
it 'includes erlang' do
82-
should contain_class('erlang')
83-
end
84-
end
85-
86-
context 'with erlang_manage set to false' do
87-
let(:params) {{ :erlang_manage => false }}
88-
it 'doesnt include erlang' do
89-
should_not contain_class('erlang')
90-
end
91-
end
92-
93-
9479
context 'deprecated parameters' do
9580
describe 'cluster_disk_nodes' do
9681
let(:params) {{ :cluster_disk_nodes => ['node1', 'node2'] }}

spec/spec_helper_system.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
# We need EPEL for erlang.
2323
if node.facts['osfamily'] == 'RedHat'
2424
shell('rpm -i http://mirrors.rit.edu/epel/6/i386/epel-release-6-8.noarch.rpm')
25+
shell('yum -y install erlang')
2526
end
2627

2728
# Install modules and dependencies
2829
puppet_module_install(:source => proj_root, :module_name => 'rabbitmq')
29-
shell('puppet module install garethr-erlang')
3030
shell('puppet module install puppetlabs-stdlib')
3131
shell('puppet module install puppetlabs-apt')
3232
shell('puppet module install nanliu-staging')

spec/system/class_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
describe "rabbitmq class:" do
44
context 'should run successfully' do
55
pp="
6-
class { 'erlang': epel_enable => true}
76
class { 'rabbitmq': }
8-
Class['erlang'] -> Class['rabbitmq']
97
"
108

119
context puppet_apply(pp) do

spec/system/clustering_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
describe "rabbitmq class:" do
44
context 'should run successfully' do
55
pp="
6-
class { 'erlang': epel_enable => true}
76
class { 'rabbitmq':
87
config_cluster => true,
98
cluster_nodes => ['rabbit1', 'rabbit2'],
109
cluster_node_type => 'ram',
1110
wipe_db_on_cookie_change => true,
1211
}
13-
Class['erlang'] -> Class['rabbitmq']
1412
"
1513

1614
context puppet_apply(pp) do

tests/erlang_deps.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# install first the garethr-erlang module. See README.md
2+
include 'erlang'
3+
4+
class { 'erlang': epel_enable => true}
5+
Class['erlang'] -> Class['rabbitmq']

0 commit comments

Comments
 (0)