I've got a small piece of puppet in my profile module to remove the default nginx.conf file which gets installed by the nginx module.
# Upon install this file gets created and displays "Welcome to NginX" page, which we don't need.
file { '/etc/nginx/conf.d/default.conf':
ensure => 'absent',
# Need to force NGinx to restart after this change has completed so we don't get a default page.
notify => Service['ningx'],
}
However this fails because the service is defined within with NginX module, not the profile.
Am I going about this in the wrong way?
Obviously I don't want it to restart every time Puppet runs, only triggered by the file being removed.
I was to avoid modifying the component module https://forge.puppet.com/puppet/nginx if at all possible.
Thanks,