has anybody else noticed issues with nesting stage classes in 2.6.0?
Using Jeffs eariler post I easily make a stage script do what I need,
the problem is if you import it in site.pp it runs for every node in
the environment, it would seem becuase it is outside any class other
than it''s special stage class . Any attempt to move the stageclass
structure inside a parent class to limit its execution seems to result
in script errors; As an example:
site.pp
----------
import "classes/works.pp"
import "classes/parent.pp"
node "my.domain.com {
include parent
}
works.pp
-------------
stage { "pre": before => Stage["main"] }
stage { "post": require => Stage["main"] }
class one { notify { "class one, first stage": } }
class two { notify { "class two, second stage": } }
class three { notify { "class three, third stage": } }
class { "one": stage => pre }
class { "two": }
class { "three": stage => post }
parent.pp
-------------
class parent {
stage { "pre": before => Stage["main"] }
stage { "post": require => Stage["main"] }
class one { notify { "class one, first stage": } }
class two { notify { "class two, second stage": } }
class three { notify { "class three, third stage": } }
class { "one": stage => pre }
class { "two": }
class { "three": stage => post }
}
the works.pp will work but will execute across all nodes regardless of
class structure or includes. parent.pp is one example of various
nesting attempts I have made to prevent staging from arbitrarily
executing the classes its using state on, but ultimatley always ends
up in an error. Through experimentation it seems that the special
stage class requires itself to be outside any other class, the problem
with this is that it will execute on any node in the environment
regardless of how you organize the classes its staging.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.