-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Fix216 #217
Fix216 #217
Changes from all commits
ebbb7ca
a0153b5
77c31c0
9405321
22329a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
Puppet::Type.newtype(:zabbix_host) do | ||
ensurable do | ||
defaultvalues | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
Puppet::Type.newtype(:zabbix_proxy) do | ||
ensurable do | ||
defaultvalues | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
Puppet::Type.newtype(:zabbix_template) do | ||
ensurable do | ||
defaultvalues | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,8 +265,7 @@ | |
# is set to for example "eth1" or "bond0.73". | ||
if ($listenip != undef) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this whole thing could be turned into a case statement to a little clearer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but lets leave that for another time maybe? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep. referenced in another issue. |
||
if ($listenip =~ /^(eth|bond|lxc|eno|tap|tun).*/) { | ||
$int_name = "ipaddress_${listenip}" | ||
$listen_ip = inline_template('<%= scope.lookupvar(int_name) %>') | ||
$int_name = getvar("::ipaddress_${listenip}") | ||
} elsif is_ip_address($listenip) or $listenip == '*' { | ||
$listen_ip = $listenip | ||
} else { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -421,8 +421,7 @@ | |
# is set to for example "eth1" or "bond0.73". | ||
if ($listenip != undef) { | ||
if ($listenip =~ /^(eth|bond|lxc|eno|tap|tun).*/) { | ||
$int_name = "ipaddress_${listenip}" | ||
$listen_ip = inline_template('<%= scope.lookupvar(int_name) %>') | ||
$int_name = getvar("::ipaddress_${listenip}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. heck, we could even put it into a function, seeing how we've got it twice :P There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mentioned that in #212. We should track that in a further PR. |
||
} elsif is_ip_address($listenip) { | ||
$listen_ip = $listenip | ||
} else { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::agent' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'rspec-puppet' | ||
|
||
at_exit { RSpec::Puppet::Coverage.report! } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::database::mysql' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::database::postgresql' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::database' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::javagateway' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::proxy' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::repo' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::sender' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::server' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::userparameter' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
def package_provider_for_gems | ||
|
@@ -117,7 +116,8 @@ def package_provider_for_gems | |
database_name: 'zabbix-server', | ||
database_user: 'zabbix-server', | ||
database_password: 'zabbix-server', | ||
zabbix_server: 'localhost') | ||
zabbix_server: 'localhost' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. while you're at it, add a trailing comma There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed in bd2918e There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @igalic: rubocop doesn't want the comma: rubocop is here a bit stricter than in other modules. remove the cop or the commit? I vote for the commit. |
||
) | ||
end | ||
|
||
it { should contain_file('/etc/zabbix/web/zabbix.conf.php').with_content(/^\$DB\['SERVER'\] = 'localhost'/) } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'spec_helper' | ||
|
||
describe 'zabbix::userparameters', type: :define do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
require 'puppetlabs_spec_helper/module_spec_helper' | ||
require 'rspec-puppet-facts' | ||
include RspecPuppetFacts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the point of that style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would force us to use:
But it would overwrite the Puppet/Provider classes.