voxpupuli / puppet-nginx

Puppet Module to manage NGINX on various UNIXes
https://forge.puppet.com/puppet/nginx
MIT License
471 stars 882 forks source link

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

Open jameskirsop opened 6 years ago

jameskirsop commented 6 years ago

Affected Puppet, Ruby, OS and module versions/distributions

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.

baurmatt commented 6 years ago

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.

EmersonPrado commented 1 year ago

+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.