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

modulesync 0.12.2 + Improvements #268

Merged
merged 12 commits into from
Aug 27, 2016
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '0.12.1'
modulesync_config_version: '0.12.2'
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ notifications:
email: false
deploy:
provider: puppetforge
edge:
deploy:
branch: ha-bug-puppet-forge
user: puppet
password:
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ group :test do
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'puppet-lint', '2.0.0', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
Expand Down
4 changes: 3 additions & 1 deletion manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@

# Ensure that the correct config file is used.
zabbix::startup {'zabbix-agent':
require => Package[$zabbix_package_agent],
pidfile => $pidfile,
agent_configfile_path => $agent_configfile_path,
require => Package[$zabbix_package_agent],
}

if $agent_configfile_path != '/etc/zabbix/zabbix_agentd.conf' {
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$server_fping6location = '/usr/bin/fping6'
$proxy_fpinglocation = '/usr/bin/fping'
$proxy_fping6location = '/usr/bin/fping6'
$manage_repo = false
$manage_repo = false
$zabbix_package_agent = 'zabbix3-agent'

}
Expand Down
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
Class['Apt::Update'] -> Package<|tag == 'zabbix'|>
}
default : {
fail('Unrecognized operating system for webserver')
fail("Managing a repo on ${::osfamily} is currently not implemented")
}
}
} # end if ($manage_repo)
Expand Down
7 changes: 5 additions & 2 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@

# Ensure that the correct config file is used.
zabbix::startup {'zabbix-server':
require => Package["zabbix-server-${db}"],
pidfile => $pidfile,
database_type => $database_type,
server_configfile_path => $server_configfile_path,
require => Package["zabbix-server-${db}"],
}

if $server_configfile_path != '/etc/zabbix/zabbix_server.conf' {
Expand Down Expand Up @@ -532,7 +535,7 @@
}

# check if selinux is active and allow zabbix
if $::osfamily == 'RedHat' and $::selinux_config_mode == 'enforcing' {
if $::selinux_config_mode == 'enforcing' {
selboolean{'zabbix_can_network':
persistent => true,
value => 'on',
Expand Down
40 changes: 30 additions & 10 deletions manifests/startup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,34 @@
# zabbix::startup { 'agent':
# }
#
# === Authors
#
# Author Name: ikben@werner-dijkerman.nl
#
# === Copyright
#
# Copyright 2014 Werner Dijkerman
#
define zabbix::startup {
define zabbix::startup (
$pidfile = undef,
$agent_configfile_path = undef,
$server_configfile_path = undef,
$database_type = undef,
) {
case $title {
/agent/: {
unless $agent_configfile_path {
fail('you have to provide a agent_configfile_path param')
}
}
/server/: {
unless $server_configfile_path {
fail('you have to provide a server_configfile_path param')
}
unless $database_type {
fail('you have to provide a database_type param')
}
}
default: {
fail('we currently only spport a title that contains agent or server')
}
}
if str2bool($::systemd) {
unless $pidfile {
fail('you have to provide a pidfile param')
}
contain ::systemd
file { "/etc/systemd/system/${name}.service":
ensure => file,
Expand All @@ -39,5 +57,7 @@
mode => '0755',
content => template("zabbix/${name}-${osfamily_downcase}.init.erb"),
}
} else {
fail('We currently only support Debian and RedHat osfamily as non-systemd')
}
}
}
Loading