-
Notifications
You must be signed in to change notification settings - Fork 232
Add switch to configure database SSL connection #80
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -48,11 +48,14 @@ | |
| $database_port = $puppetdb::params::database_port, | ||
| $database_username = $puppetdb::params::database_username, | ||
| $database_password = $puppetdb::params::database_password, | ||
| $database_name = $puppetdb::params::database_name | ||
| $database_name = $puppetdb::params::database_name, | ||
| $database_ssl = $puppetdb::params::database_ssl | ||
| ) inherits puppetdb::params { | ||
|
|
||
| # We don't need any validation for the embedded database, presumably. | ||
| if ($database == 'postgres' and $database_password != undef) { | ||
| if ($database == 'postgres' and ( | ||
| $database_password != undef and $database_ssl == false) | ||
|
Contributor
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. Is this because validate_db_connection doesn't support SSL?
Contributor
Author
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. validate_db_connection does support SSL, because it uses psql. psql expects certificates to be located in a .postgresql folder inside the home folder of the executing user.
Contributor
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. So I like this feature, I really do - but can't help but think this is incomplete because of our inability to use validate_db_connection. I do however realise that getting everything working is going to be a hassle, but it feels like a bad line to draw. Maybe I'm just being pedantic, but I would like to find a better incremental release of this feature somehow. Let me ponder some more, but I don't suppose you have any ideas on doing something that is a stop-gap?
Contributor
Author
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. If you insist on validate_db_connection, then there is only one way to solve this :) |
||
| ) { | ||
| postgresql::validate_db_connection { 'validate puppetdb postgres connection': | ||
| database_host => $database_host, | ||
| database_port => $database_port, | ||
|
|
||
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.
Sorry, should have picked this up before, this needs to be documented now in README.md
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.
Also as per convention it needs to be available in the main class
puppetdbas well, I think that is what is normally documented. For good or bad.