-
-
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
Add pg_hba rule to allow zabbix server #411 #412
Conversation
Add a pg_hba rule to aways add this rule for allow zabbix server connect to database. voxpupuli#411
Hi @RaphaelNeumann, thanks for the patch. Can you take a look at the failing spec tests? |
@bastelfreak of course... I will send fix soon |
@bastelfreak It's there :D |
manifests/database.pp
Outdated
|
||
# When every component has its own server, we have to allow those servers to | ||
# access the database from the network. Postgresl allows this via the |
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.
typo: Postgresl -> Postgresql
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.
thanks man
spec/classes/database_spec.rb
Outdated
@@ -65,6 +66,32 @@ | |||
it { is_expected.to contain_class('zabbix::params') } | |||
end | |||
|
|||
describe 'database_type is postgresql, zabbix_type is server and zabbbix_server anda zabbix_web in the some server but zabbix_database is on other server' do |
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.
typo: anda -> "and a"
# of server and web has to be supplied as an parameter. | ||
if $zabbix_web_ip != $zabbix_server_ip { | ||
# When database not in some server with zabbix server include pg_hba_rule to server | ||
if ($database_host_ip != $zabbix_server_ip) or ($zabbix_web_ip != $zabbix_server_ip){ |
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.
is this logic correct? Shouldn't it be: if ($database_host_ip != $zabbix_server_ip){}
?
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.
Yes, I agree with this logic, but on current and old versions of this module has this rule, if I change this logic, current implements will stop working.
For warrant the retro-compatibility I just added an "or" condition for this existent rule.
Thanks! |
Add a pg_hba rule to aways add this rule for allow zabbix server connect to database. #411