Skip to content

Conversation

pythianjoseph
Copy link

If selinux is set to enforced, puppet-nagios would need thias-selinux module as dependency. Otherwise it puppet would dump following.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type selinux::audit2allow at /etc/puppet/environments/production/modules/nagios/manifests/server.pp:685 on node xxx.pythian.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

@thias
Copy link
Owner

thias commented Jul 29, 2014

You are correct, but since this is an optional dependency, which people will only need if they have SELinux activated, this change will pull in a useless module for some people...

I'm not against adding the dependency, but I'm quite sure that I'll then get complaints that it should be removed...

And to make things even better, the exact same is true with my apache_httpd and php modules!

Thoughts?

@pythianjoseph
Copy link
Author

@thias Sorry for the very late reply. I think a dependency is needed if you are calling a class inside a module. I could not find a way to conditionally add a dependency.

Not adding the module dependency causes puppet run breakage, which seem to be more informant issue than adding an extra module in the puppet server.

Let me know your opinion.

  # With selinux, some nrpe plugins require additional rules to work
  if $selinux and $::selinux_enforced {
    selinux::audit2allow { 'nrpe':
      source => "puppet:///modules/${module_name}/messages.nrpe",
    }

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