Skip to content

Commit 6f4023f

Browse files
authored
Merge pull request #699 from voxpupuli/modulesync
modulesync 3.0.0 & puppet-lint fixes & rubocop fixes
2 parents 1846061 + c79db29 commit 6f4023f

34 files changed

+147
-153
lines changed

.github/SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Vox Pupuli Security Policy
2+
3+
Our vulnerabilities reporting process is at https://voxpupuli.org/security/

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
modulesync_config_version: '2.12.0'
1+
modulesync_config_version: '3.0.0'

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,9 @@ RSpec/RepeatedDescription:
528528
RSpec/NestedGroups:
529529
Enabled: False
530530

531+
RSpec/MultipleExpectations:
532+
Enabled: false
533+
531534
# this is broken on ruby1.9
532535
Layout/IndentHeredoc:
533536
Enabled: False

.sync.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ Gemfile:
1313
- gem: 'zabbixapi'
1414
spec/spec_helper.rb:
1515
mock_with: ':mocha'
16+
spec/spec_helper_acceptance.rb:
17+
unmanaged: false

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
os: linux
23
dist: bionic
34
language: ruby
45
cache: bundler
@@ -7,7 +8,7 @@ before_install:
78
- bundle --version
89
script:
910
- 'bundle exec rake $CHECK'
10-
matrix:
11+
jobs:
1112
fast_finish: true
1213
include:
1314
- rvm: 2.4.4
@@ -68,7 +69,7 @@ notifications:
6869
- "chat.freenode.org#voxpupuli-notifications"
6970
deploy:
7071
provider: puppetforge
71-
user: puppet
72+
username: puppet
7273
password:
7374
secure: "ijm7hKPYWr1eg7151g5oK6MzZL4ojrgWjKlxgoBHXAdXdY88opMgvixfSJK5IMUbtanPfWRkqqABx+MYO78nfQBWDlghUzZ8sQXFeO2Ie0PgWl4nFV0kKWz+ejVaZC4dKSZlWha5pO1ek+sx7KnjIBZY82OXs/GXbjwhHx6d56YugXLuCyvfFxC7mXC9wF58bPwcYRCBSZt9CRl0OMBAFybxjdwsFMloRRhdz7f3hhlqF8Nrs1sxG1HhgiMcnrZqovNfb3Tw9K1RPYATazXxQrjcI7YHvJx0AvtHFUsn+/A0GtpKUuuPbaVdkYgE1Tye0AsAcey6RW4xhJywZglKrzDk7vfyUiU5CObeLh4/dhub3k111rDPL8v6v9t40fteduJoFLziHotQwdl37UALL7PwWZY5HuJvaBqHY2LsGs/ptGMB9ZCzxA85jfDw8lrZQ7P97SAoC34Ihs8D6vkKT9HUKHIXh19O5AAa70jReru0ej179IBjvs8m9nDwDNdY3sIsdhUU8WQ3BftDF6M8OzvgyLKDvjSs1Izag+Asl2Ze7RAQfQ2RvbfkDm9KEFnDQtXtzF4Cu1Ed6io2j1zI71JFQpIf6zb1qeNrhqulbJ15owGkQmHBgD8K+bDd1CCU4kA26axypV00XDsjfwdtFHgtUO3AlUVUim0QTMk9ATc="
7475
on:

Gemfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ def location_for(place, fake_version = nil)
1111
end
1212

1313
group :test do
14-
gem 'voxpupuli-test', '>= 1.0.0', :require => false
15-
gem 'coveralls', :require => false
16-
gem 'simplecov-console', :require => false
17-
gem 'fakefs', :require => false
18-
gem 'zabbixapi', :require => false
19-
gem 'rspec-puppet-facts', :require => false, :git => 'https://github.com/mcanevet/rspec-puppet-facts', :ref => '9541292d4fc35db3be1badace673c1108154b571'
14+
gem 'voxpupuli-test', '~> 2.0', :require => false
15+
gem 'coveralls', :require => false
16+
gem 'simplecov-console', :require => false
17+
gem 'fakefs', :require => false
18+
gem 'zabbixapi', :require => false
2019
end
2120

2221
group :development do

manifests/agent.pp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@
309309
String $service_type = $zabbix::params::service_type,
310310
Boolean $manage_startup_script = $zabbix::params::manage_startup_script,
311311
) inherits zabbix::params {
312-
313312
# the following two codeblocks are a bit blargh. The correct default value for
314313
# $real_additional_service_params and $type changes based on the value of $zabbix_version
315314
# We handle this in the params.pp, but that doesn't work if somebody provides a specific
@@ -408,13 +407,13 @@
408407
ensure => $zabbix_package_state,
409408
require => Class['zabbix::repo'],
410409
tag => 'zabbix',
411-
provider => $zabbix_package_provider,
410+
provider => $zabbix_package_provider,
412411
}
413412
}
414413

415414
# Ensure that the correct config file is used.
416415
if $manage_startup_script {
417-
zabbix::startup {$servicename:
416+
zabbix::startup { $servicename:
418417
pidfile => $pidfile,
419418
agent_configfile_path => $agent_configfile_path,
420419
zabbix_user => $zabbix_user,
@@ -488,14 +487,15 @@
488487
state => [
489488
'NEW',
490489
'RELATED',
491-
'ESTABLISHED'],
490+
'ESTABLISHED',
491+
],
492492
}
493493
}
494494
}
495495
# the agent doesn't work perfectly fine with selinux
496496
# https://support.zabbix.com/browse/ZBX-11631
497497
if fact('os.selinux.enabled') == true and $manage_selinux {
498-
selinux::module{'zabbix-agent':
498+
selinux::module { 'zabbix-agent':
499499
ensure => 'present',
500500
content_te => template('zabbix/selinux/zabbix-agent.te.erb'),
501501
before => Service[$servicename],

manifests/database.pp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
#
115115
# Copyright 2014 Werner Dijkerman
116116
#
117-
class zabbix::database(
117+
class zabbix::database (
118118
$zabbix_type = 'server',
119119
$zabbix_web = $zabbix::params::zabbix_web,
120120
$zabbix_web_ip = $zabbix::params::zabbix_web_ip,
@@ -134,7 +134,6 @@
134134
$database_collate = $zabbix::params::server_database_collate,
135135
Optional[String[1]] $database_tablespace = $zabbix::params::server_database_tablespace,
136136
) inherits zabbix::params {
137-
138137
# So lets create the databases and load all files. This can only be
139138
# happen when manage_database is set to true (Default).
140139
if $manage_database == true {
@@ -156,7 +155,7 @@
156155
}
157156

158157
# When database not in some server with zabbix server include pg_hba_rule to server
159-
if ($database_host_ip != $zabbix_server_ip) or ($zabbix_web_ip != $zabbix_server_ip){
158+
if ($database_host_ip != $zabbix_server_ip) or ($zabbix_web_ip != $zabbix_server_ip) {
160159
postgresql::server::pg_hba_rule { 'Allow zabbix-server to access database':
161160
description => 'Open up postgresql for access from zabbix-server',
162161
type => 'host',

manifests/database/mysql.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
$database_user = '',
2424
$database_password = '',
2525
$database_host = '',
26-
$database_path = $zabbix::params::database_path,) inherits zabbix::params {
27-
26+
$database_path = $zabbix::params::database_path,
27+
) inherits zabbix::params {
2828
assert_private()
2929

3030
#

manifests/database/postgresql.pp

Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
$database_host = '',
2626
$database_path = $zabbix::params::database_path,
2727
) inherits zabbix::params {
28-
2928
assert_private()
3029

3130
#
@@ -99,46 +98,38 @@
9998
}
10099

101100
case $zabbix_type {
102-
'proxy': {
103-
exec { 'zabbix_proxy_create.sql':
104-
command => $zabbix_proxy_create_sql,
105-
path => "/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:${database_path}",
106-
unless => 'test -f /etc/zabbix/.schema.done',
107-
provider => 'shell',
108-
require => [
109-
Exec['update_pgpass'],
110-
],
111-
}
101+
'proxy': {
102+
exec { 'zabbix_proxy_create.sql':
103+
command => $zabbix_proxy_create_sql,
104+
path => "/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:${database_path}",
105+
unless => 'test -f /etc/zabbix/.schema.done',
106+
provider => 'shell',
107+
require => Exec['update_pgpass'],
112108
}
113-
'server': {
114-
exec { 'zabbix_server_create.sql':
115-
command => $zabbix_server_create_sql,
116-
path => "/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:${database_path}",
117-
unless => 'test -f /etc/zabbix/.schema.done',
118-
provider => 'shell',
119-
require => [
120-
Exec['update_pgpass'],
121-
],
122-
}
123-
-> exec { 'zabbix_server_images.sql':
124-
command => $zabbix_server_images_sql,
125-
path => "/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:${database_path}",
126-
unless => 'test -f /etc/zabbix/.images.done',
127-
provider => 'shell',
128-
require => [
129-
Exec['update_pgpass'],
130-
],
131-
}
132-
-> exec { 'zabbix_server_data.sql':
133-
command => $zabbix_server_data_sql,
134-
path => "/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:${database_path}",
135-
unless => 'test -f /etc/zabbix/.data.done',
136-
provider => 'shell',
137-
require => [
138-
Exec['update_pgpass'],
139-
],
140-
}
109+
}
110+
'server': {
111+
exec { 'zabbix_server_create.sql':
112+
command => $zabbix_server_create_sql,
113+
path => "/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:${database_path}",
114+
unless => 'test -f /etc/zabbix/.schema.done',
115+
provider => 'shell',
116+
require => Exec['update_pgpass'],
117+
}
118+
-> exec { 'zabbix_server_images.sql':
119+
command => $zabbix_server_images_sql,
120+
path => "/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:${database_path}",
121+
unless => 'test -f /etc/zabbix/.images.done',
122+
provider => 'shell',
123+
require => Exec['update_pgpass'],
141124
}
125+
-> exec { 'zabbix_server_data.sql':
126+
command => $zabbix_server_data_sql,
127+
path => "/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:${database_path}",
128+
unless => 'test -f /etc/zabbix/.data.done',
129+
provider => 'shell',
130+
require => Exec['update_pgpass'],
131+
}
132+
}
142133
default: {
143134
fail 'We do not work.'
144135
}

0 commit comments

Comments
 (0)