Hi folks.

I'm currently working on a profile that setup Apache in a specific environment
where I need to add a requirement on its systemd unit.

I was wondering how to notify the Apache service defined in ::apache::service
knowing it's supposed to be a private class.

Here is a code snippet:

```puppet
class profile::apache {
  include ::apache

  ::systemd::dropin_file { 'apache requirements.conf':
    unit     => 'apache2.service',
    filename => 'requirements.conf',
    source   => 'puppet:///modules/profile/apache/systemd-requirements.conf',
    # What shoud I do here:
    #notify   => Class['::apache'],
    #notify   => Class['::apache::service'],
  }
}
                                                                                
```

Both ways work but the first one (refreshing the whole apache module) may lead
to some exec resources being run even if they shouldn't.

Is there some kind of best practice here?

-- 
Johan Fleury
PGP Key ID : 0x5D404386805E56E6

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1520884187.2724.19.camel%40arcaik.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to