Details
Description
The following manifest fails when run with --noop, but succeeds when run normally:
t.pp |
file { '/tmp/foo-bar':
|
content => "Hello\n",
|
}
|
|
file { '/tmp/bar-foo':
|
source => "file:///tmp/foo-bar",
|
require => File['/tmp/foo-bar'],
|
}
|
$ rm -rf /tmp/foo-bar /tmp/bar-foo; puppet apply t.pp
|
Notice: Compiled catalog for swillis-macbook-pro.local in environment production in 0.12 seconds
|
Notice: /Stage[main]/Main/File[/tmp/foo-bar]/ensure: defined content as '{md5}09f7e02f1290be211da707a266f153b3'
|
Notice: /Stage[main]/Main/File[/tmp/bar-foo]/ensure: defined content as '{md5}09f7e02f1290be211da707a266f153b3'
|
Notice: Finished catalog run in 0.06 seconds
|
$ rm -rf /tmp/foo-bar /tmp/bar-foo; puppet apply --noop t.pp
|
Notice: Compiled catalog for swillis-macbook-pro.local in environment production in 0.12 seconds
|
Notice: /Stage[main]/Main/File[/tmp/foo-bar]/ensure: current_value absent, should be file (noop)
|
Error: /Stage[main]/Main/File[/tmp/bar-foo]: Could not evaluate: Could not retrieve information from environment production source(s) file:///tmp/foo-bar
|
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
|
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
|
Notice: Finished catalog run in 0.05 seconds
|
A resource (in this case: file) should not fail when run under noop just because one of its predicates (in this case: its source existing) isn't true. Especially when the resource has a require which very well may end up satisfying the predicate.
Attachments
Issue Links
- relates to
-
PUP-3907 Noop changes to file ownership generate failures if required User or Group does not exist
-
- Resolved
-