-
Notifications
You must be signed in to change notification settings - Fork 72
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
httpd-nagios.conf.erb undefined method `each' for nil:NilClass #19
Comments
I was able to pass this error by adding the following directive in the nagios::server class apache_allowed_from => '127.0.0.1' |
Confirming, I have same issue too. |
This might be fixed in the master branch of the nagios module, could you maybe try it out and report back? |
I've install nagios module from git and now it fails with this error:
I have two questions. How to define "allowed_from" apache directive in puppet? Does nagios module require ruby version > 2? Because I've 1.8.7 ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-linux] |
I'm running 1.8.7 on CentOS 6.5 without issue. $ruby --version |
NMerc, can you show how you define "allowed_from" in puppet config for nagios server? Do you use "apache_allowed_from"? |
I'm not using it, sorry. |
Anyway if I delete "apache_allowed_from" from puppet config it fails with error I've listed above. |
It should work with |
Use the Source, Luke. Solved. Problem is early compilation of class { 'nagios::server': apache_httpd_ssl => false, apache_httpd_conf_content => template('my/httpd-nagios.conf.erb'), That loses; the template causes compile before class variables are available! I patched Thias' $apache_httpd_conf_content_name = undef, Then further down, modified block as follows: # Set a default content template if no content/source is specified # ABr, 20141029: use new variable apache_httpd_conf_content_name if $apache_httpd_conf_source == '' { if $apache_httpd_conf_content_name != '' { # ABr, 20141029: permit late compilation of ERB $apache_httpd_conf_content_final = template($apache_httpd_conf_content_name) } elsif $apache_httpd_conf_content == '' { $apache_httpd_conf_content_final = template("${module_name}/apache_httpd/httpd-nagios.conf.erb") } else { $apache_httpd_conf_content_final = $apache_httpd_conf_content } } That wins! All variables are now available. Let me know if any interest, I'll post the modified files and send them to Thias. |
Hi,
I am using v0.4.7 of the module and have also installed your apache_httpd (v0.4.2) and php (v0.3.12) modules as well. The following error shows up on my puppet run:
Filepath: /etc/puppet/environments/production/modules/nagios/templates/apache_httpd/httpd-nagios.conf.erb
Line: 7
Detail: undefined method `each' for nil:NilClass
at /etc/puppet/environments/production/modules/nagios/manifests/server.pp:20 on node
Whats noticeable is that I do not have a value for apache_httpd_conf_content in my class, which was copied from an older running installation.
Any ideas?
The text was updated successfully, but these errors were encountered: