puppet-nginx icon indicating copy to clipboard operation
puppet-nginx copied to clipboard

Module doesn't handle installation of related package(s)

Open jameskirsop opened this issue 7 years ago • 2 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5
  • Distribution: CentOS 7
  • Module version: 0.13.0

How to reproduce (e.g Puppet code you use)

class {'nginx':
...
x_streamhosts => {
		syslog => {
			ensure => 'present',
			listen_port => 5149,
			...
		}
	},
}

What are you seeing

Streamhosts don't work without manually installing the mod-stream centos package.

What behaviour did you expect instead

The puppet module would install the necessary package(s) to make the configured module work.

Any additional information you'd like to impart

It would make sense to me, that this would happen automatically, within the module.

I expect this scenario is true for other nginx modules also.

jameskirsop avatar Sep 17 '18 03:09 jameskirsop

I would prefer to get rid of the streamhost resource in this module in the first place because streamhost is just a customized server which should be configured through nginx::resource::server in a profile.

baurmatt avatar Oct 26 '18 07:10 baurmatt

+1 for "this would happen automatically, within the module". The module requires, and nothing else uses, the package. As a developer, I'd expect Puppet to handle this kind of dependencies. There is alredy a parameter nginx::dynamic_modules, which goes into nginx.conf template. It could also go to a class such as package::modules for this installation.

EmersonPrado avatar Apr 08 '23 19:04 EmersonPrado