Add transitive relationships to Class['nginx']

Without this change, the end user of the module may run into issues
establishing relationships to the composite class (the main nginx class)

For example, the user may declare this relationship expecting
nginx to be managed after the yum repositories have been configured:

    node default {
      class { 'site::yumconfig': }
      -> class { 'nginx': }
    }

However, all of the resources exist in implementation classes, which
do not have a transitive relationship declared to the nginx class.
Without this change, Puppet may very well manage Class['nginx::config']
before Class['site::yumconfig'] even though the user clearly indicated
this should not be the case.
This commit is contained in:
Jeff McCune 2011-06-14 20:02:17 -07:00
parent 79243391ea
commit 3e380e242b

View file

@ -29,4 +29,9 @@ class nginx {
include nginx::service
Class['nginx::package'] -> Class['nginx::config'] ~> Class['nginx::service']
# Allow the end user to establish relationships to the "main" class
# and preserve the relationship to the implementation classes through
# a transitive relationship to the composite class.
Class['nginx::service'] -> Class['nginx']
}