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

make optional auth block of httpd-nagios.conf #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vchepkov
Copy link
Contributor

@vchepkov vchepkov commented Nov 2, 2015

apache_httpd_htpasswd_source is optional in server.pp, this change makes block depending
on it optional as well

apache_httpd_htpasswd_source is optional in server.pp, this change makes block depending
on it optional as well
@thias
Copy link
Owner

thias commented Nov 16, 2015

Nice corner case! I'm managing the file from elsewhere in my puppet manifests. So I actually need the httpd configuration for the /etc/nagios/.htpasswd file present, while having apache_httpd_htpasswd_source set to false. So your change would break my nagios servers :-)

Maybe add an $apache_httpd_htpasswd parameter defaulting to true to control that template part?

If that would work for you, or if you can think of any better way to fulfill your requirements as well as mine, please update this PR, and also make sure not to remove the last empty line of the file for nothing (as it changes for everyone and triggers a useless service reload).

@thias thias self-assigned this Nov 16, 2015
@vchepkov
Copy link
Contributor Author

oh, intersting, I can see how it can be useful, if the same file shared between different modules.
How about we introduce two variables instead?

apache_httpd_htpasswd_path = '/etc/nagios/.htpasswd'
apache_httpd_htpasswd_manage = false

First one would determine location of the file, since some people would have it in /etc/httpd/conf/, for example. And by setting it to undef, one can disable auth block

second one will determine if we want to manage this file by this module.

@vchepkov
Copy link
Contributor Author

P.S. My editor removes 'wasteful' spaces

@vchepkov
Copy link
Contributor Author

Haven't heard from you, so I will redo the change the way I suggested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants