@@ -46,7 +46,7 @@ class Chef::Recipe
46
46
default_deb_package_name = "rabbitmq-server_#{ version } -1_all.deb"
47
47
48
48
default_rpm_package_name = value_for_platform (
49
- [ ' centos' , ' rhel' , ' scientific' ] => {
49
+ %w( centos rhel redhat scientific ) => {
50
50
'< 7.0' => "rabbitmq-server-#{ version } -1.el6.noarch.rpm" ,
51
51
'default' => "rabbitmq-server-#{ version } -1.el7.noarch.rpm"
52
52
} ,
@@ -77,8 +77,7 @@ class Chef::Recipe
77
77
end
78
78
79
79
## Install the package
80
- case node [ 'platform_family' ]
81
- when 'debian'
80
+ if platform_family? ( 'debian' , 'ubuntu' )
82
81
template '/etc/apt/apt.conf.d/90forceyes' do
83
82
source '90forceyes.erb'
84
83
owner 'root'
@@ -154,8 +153,9 @@ class Chef::Recipe
154
153
variables ( :max_file_descriptors => node [ 'rabbitmq' ] [ 'max_file_descriptors' ] )
155
154
end
156
155
end
156
+ end
157
157
158
- when 'fedora'
158
+ if platform_family? ( 'fedora' )
159
159
package 'logrotate'
160
160
package 'socat'
161
161
@@ -180,7 +180,9 @@ class Chef::Recipe
180
180
end
181
181
rpm_package "#{ Chef ::Config [ :file_cache_path ] } /#{ rpm_package_name } "
182
182
end
183
- when 'rhel' , 'centos' , 'scientific'
183
+ end
184
+
185
+ if platform_family? ( 'rhel' , 'redhat' , 'centos' , 'scientific' ) # ~FC024
184
186
package 'logrotate'
185
187
if node [ 'platform_version' ] . to_i >= 7
186
188
package 'socat'
@@ -215,7 +217,9 @@ class Chef::Recipe
215
217
end
216
218
rpm_package "#{ Chef ::Config [ :file_cache_path ] } /#{ rpm_package_name } "
217
219
end
218
- when 'amazon'
220
+ end
221
+
222
+ if platform_family? ( 'amazon' )
219
223
package 'logrotate'
220
224
package 'socat'
221
225
@@ -241,8 +245,9 @@ class Chef::Recipe
241
245
end
242
246
yum_package "#{ Chef ::Config [ :file_cache_path ] } /#{ rpm_package_name } "
243
247
end
244
- when 'suse'
248
+ end
245
249
250
+ if platform_family? ( 'suse' )
246
251
package 'logrotate'
247
252
package 'socat'
248
253
@@ -257,8 +262,9 @@ class Chef::Recipe
257
262
action :install
258
263
version node [ 'rabbitmq' ] [ 'version' ] if node [ 'rabbitmq' ] [ 'pin_distro_version' ]
259
264
end
265
+ end
260
266
261
- when 'smartos'
267
+ if platform_family? ( 'smartos' )
262
268
package 'rabbitmq' do
263
269
action :install
264
270
version node [ 'rabbitmq' ] [ 'version' ] if node [ 'rabbitmq' ] [ 'pin_distro_version' ]
@@ -270,6 +276,10 @@ class Chef::Recipe
270
276
271
277
end
272
278
279
+ #
280
+ # Users and directories
281
+ #
282
+
273
283
if platform_family? ( 'amazon' )
274
284
user 'rabbitmq' do
275
285
username node [ 'rabbitmq' ] [ 'user' ]
0 commit comments