Skip to content

Commit 331d517

Browse files
committed
[style] puppet-lint and rubocop updates
* modulesync 3.0 updates some style guidelines
1 parent e56c258 commit 331d517

File tree

19 files changed

+19
-55
lines changed

19 files changed

+19
-55
lines changed

examples/erlang_deps.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# install first the garethr-erlang module. See README.md
22
include erlang
33

4-
class { 'erlang': epel_enable => true}
4+
class { 'erlang': epel_enable => true }
55
Class['erlang'] -> Class['rabbitmq']

examples/plugin.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$rabbitmq_plugins = [ 'amqp_client', 'rabbitmq_stomp' ]
1+
$rabbitmq_plugins = ['amqp_client', 'rabbitmq_stomp']
22

33
class { 'rabbitmq':
44
config_stomp => true,

examples/site.pp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
node default {
2-
3-
$rabbitmq_plugins = [ 'amqp_client', 'rabbitmq_stomp' ]
2+
$rabbitmq_plugins = ['amqp_client', 'rabbitmq_stomp']
43

54
class { 'rabbitmq':
65
config => '[ {rabbit_stomp, [{tcp_listeners, [1234]} ]} ].',
@@ -13,4 +12,3 @@
1312
provider => 'rabbitmqplugins',
1413
}
1514
}
16-

manifests/config.pp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# @api private
55
class rabbitmq::config {
6-
76
$admin_enable = $rabbitmq::admin_enable
87
$management_enable = $rabbitmq::management_enable
98
$use_config_file_for_plugins = $rabbitmq::use_config_file_for_plugins
@@ -104,7 +103,7 @@
104103
$management_ip_address = $rabbitmq::node_ip_address
105104
}
106105

107-
$inetrc_env = {'export ERL_INETRC' => $inetrc_config_path}
106+
$inetrc_env = { 'export ERL_INETRC' => $inetrc_config_path }
108107

109108
# Handle env variables.
110109
$_environment_variables = $default_ssl_env_variables + $inetrc_env + $rabbitmq::environment_variables
@@ -125,7 +124,7 @@
125124
$proto_dist = 'inet6_tcp'
126125
$ssl_path = ''
127126
}
128-
$ipv6_or_tls_env = ['SERVER_ADDITIONAL', 'CTL'].reduce({}) |$memo, $item| {
127+
$ipv6_or_tls_env = ['SERVER_ADDITIONAL', 'CTL'].reduce( {}) |$memo, $item| {
129128
$orig = $_environment_variables["RABBITMQ_${item}_ERL_ARGS"]
130129
$munged = $orig ? {
131130
# already quoted, keep quoting
@@ -136,7 +135,7 @@
136135
default => "\"${orig}${ssl_path} -proto_dist ${proto_dist}\"",
137136
}
138137
139-
merge($memo, {"RABBITMQ_${item}_ERL_ARGS" => $munged})
138+
merge($memo, { "RABBITMQ_${item}_ERL_ARGS" => $munged })
140139
}
141140
142141
$environment_variables = $_environment_variables + $ipv6_or_tls_env
@@ -227,12 +226,12 @@
227226
mode => '0644',
228227
}
229228
}
230-
default: { }
229+
default: {}
231230
}
232231
233232
if $facts['systemd'] { # systemd fact provided by systemd module
234233
systemd::service_limits { "${service_name}.service":
235-
limits => {'LimitNOFILE' => $file_limit},
234+
limits => { 'LimitNOFILE' => $file_limit },
236235
# The service will be notified when config changes
237236
restart_service => false,
238237
}

manifests/init.pp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
# @param loopback_users
299299
# This option configures a list of users to allow access via the loopback interfaces
300300
#
301-
class rabbitmq(
301+
class rabbitmq (
302302
Boolean $admin_enable = true,
303303
Boolean $management_enable = false,
304304
Boolean $use_config_file_for_plugins = false,
@@ -399,12 +399,11 @@
399399
Array $loopback_users = ['guest'],
400400
Boolean $service_restart = true,
401401
) {
402-
403402
if $ssl_only and ! $ssl {
404403
fail('$ssl_only => true requires that $ssl => true')
405404
}
406405

407-
if $config_stomp and $stomp_ssl_only and ! $ssl_stomp_port {
406+
if $config_stomp and $stomp_ssl_only and ! $ssl_stomp_port {
408407
fail('$stomp_ssl_only requires that $ssl_stomp_port be set')
409408
}
410409

@@ -498,5 +497,4 @@
498497

499498
# Make sure the various providers have their requirements in place.
500499
Class['rabbitmq::install'] -> Rabbitmq_plugin<| |>
501-
502500
}

manifests/install.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# @api private
44
class rabbitmq::install {
5-
65
$package_ensure = $rabbitmq::package_ensure
76
$package_name = $rabbitmq::package_name
87
$rabbitmq_group = $rabbitmq::rabbitmq_group

manifests/install/rabbitmqadmin.pp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
#
33
# @api private
44
class rabbitmq::install::rabbitmqadmin {
5-
65
if $rabbitmq::rabbitmqadmin_package {
7-
package{'rabbitmqadmin':
6+
package { 'rabbitmqadmin':
87
ensure => 'present',
98
name => $rabbitmq::rabbitmqadmin_package,
109
}
1110
} else {
12-
1311
$python_package = $rabbitmq::python_package
1412
# Some systems (e.g., Ubuntu 16.04) don't ship Python 2 by default
1513
if $rabbitmq::manage_python {

manifests/management.pp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
#
33
# @api private
44
class rabbitmq::management {
5-
65
$delete_guest_user = $rabbitmq::delete_guest_user
76

87
if $delete_guest_user {
9-
rabbitmq_user{ 'guest':
8+
rabbitmq_user { 'guest':
109
ensure => absent,
1110
provider => 'rabbitmqctl',
1211
}
1312
}
14-
1513
}

manifests/repo/apt.pp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
# puppetlabs-stdlib
44
#
55
# @api private
6-
class rabbitmq::repo::apt(
6+
class rabbitmq::repo::apt (
77
String $location = 'https://packagecloud.io/rabbitmq/rabbitmq-server',
88
String $repos = 'main',
99
Boolean $include_src = false,
1010
String $key = '8C695B0219AFDEB04A058ED8F4E789204D206F89',
1111
String $key_source = $rabbitmq::package_gpg_key,
1212
Optional[String] $key_content = $rabbitmq::key_content,
1313
Optional[String] $architecture = undef,
14-
) {
15-
14+
) {
1615
$osname = downcase($facts['os']['name'])
1716
$pin = $rabbitmq::package_apt_pin
1817

manifests/repo/rhel.pp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Makes sure that the Packagecloud repo is installed
22
#
33
# @api private
4-
class rabbitmq::repo::rhel(
5-
$location = "https://packagecloud.io/rabbitmq/rabbitmq-server/el/${facts['os'][release][major]}/\$basearch",
6-
String $key_source = $rabbitmq::package_gpg_key,
7-
) {
8-
4+
class rabbitmq::repo::rhel (
5+
$location = "https://packagecloud.io/rabbitmq/rabbitmq-server/el/${facts['os'][release][major]}/\$basearch",
6+
String $key_source = $rabbitmq::package_gpg_key,
7+
) {
98
yumrepo { 'rabbitmq':
109
ensure => present,
1110
name => 'rabbitmq_rabbitmq-server',

0 commit comments

Comments
 (0)