Issue #3715 has been updated by James Turnbull.

Category set to functions
Status changed from Unreviewed to Needs more information
Assigned to set to Brice Figureau

Brice - comments?
----------------------------------------
Bug #3715: require class doesn't do what I expect
http://projects.puppetlabs.com/issues/3715

Author: Alan Barrett
Status: Needs more information
Priority: Normal
Assigned to: Brice Figureau
Category: functions
Target version: 
Affected version: 0.25.4
Keywords: 
Branch: 


Requiring a class doesn't work as expected.

<pre>
node myclient {
    include test
}

class test {
    include pkg_foo
    include bar
}

class pkg_foo {
    package { "FOO": ensure => "1.2.3" }
}

class bar {
    require bar::prerequisites
    file { "/bar/baz": ensure => file }
}

class bar::prerequisites {
    require pkg_foo
}
</pre>

When I run the above manifest using "puppetd --onetime --test --noop" on the 
client, I see this:

<pre>
# /usr/local/sbin/puppetd --onetime --test --noop
info: Caching catalog for myclient.example
info: Applying configuration version '1272967229'
notice: //bar/File[/bar/baz]/ensure: is absent, should be file (noop)
notice: //pkg_foo/Package[FOO]/ensure: is absent, should be 1.2.3 (noop)
notice: Finished catalog run in 21.14 seconds
</pre>

but I want Package[FOO] to be installed before File[/bar/baz], and puppet's 
doing it in the wrong order.

I expect File[/bar/baz] to depend on Class[bar::prerequisites]; and that class 
to depend on Class[pkg_foo].  I expect anything that depends (directly or 
indirectly) on Class[pkg_foo] to wait until after Package[FOO] is installed, 
but that's not happening.




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to