Why is 'notify' acting as a 'before' and not a 'require' ?

Can someone explain why this way is unlogical to Puppet parser, why the
'notify' would create a dependency cycle ? Why would the 'notify' need to
create an order ? Isn't it supposed to carry a message, and not a
constraint ?

Typically i would need something like this

    # First i have an Apache class
    class apache {
        #(...)
        exec { 'apache-reload':
            command     => '/sbin/service httpd reload',
            refreshonly => true,
            require     => Service['apache'],
        }
    }

    # Then another class which adds an Apache conf file
    class backup::backuppc::web {
        #(...)

        require 'apache'

        file { '/etc/httpd/conf.d/BackupPC.conf':
            #(...)
            require => [ Class['apache'] ],
            notify  => Exec['apache-reload'],
        }
    }

I find it logical that my 'BackupPC.conf' apache file is put after the
apache package is installed, or more broadly after the apache class is
complete. Afterwards, i put the 'BackupPC.conf' conf, and then afterwards,
i want to notify Exec['apache-reload'], that it needs to reload. To me, the
notify is a good way to ensure the apache class does not have to know
anything about the backup class, and stay generic, while at the same time
ensuring that the backup class can notify the apache service if it thinks
it needs to.

Unfortunately, the 'notify' is acting as a 'before' and creates a
dependency cycle. It breaks the scheme of being able to keep the apache
class generic yet able to respond to notifications

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to