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

Add pg_hba rule to allow zabbix server #411 #412

Merged
merged 11 commits into from
Jun 26, 2017

Conversation

RaphaelNeumann
Copy link
Contributor

Add a pg_hba rule to aways add this rule for allow zabbix server connect to database. #411

Add a pg_hba rule to aways add this rule for allow zabbix server connect to database. voxpupuli#411
@bastelfreak bastelfreak added the bug Something isn't working label Jun 23, 2017
@bastelfreak
Copy link
Member

Hi @RaphaelNeumann, thanks for the patch. Can you take a look at the failing spec tests?

@RaphaelNeumann
Copy link
Contributor Author

@bastelfreak of course... I will send fix soon

@RaphaelNeumann
Copy link
Contributor Author

@bastelfreak It's there :D


# 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Postgresl -> Postgresql

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks man

@@ -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
Copy link
Member

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){
Copy link
Member

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){} ?

Copy link
Contributor Author

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.

@bastelfreak
Copy link
Member

Thanks!

@bastelfreak bastelfreak merged commit 2b8814e into voxpupuli:master Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants