Issue #2762 has been updated by Stefan Schulte.
One question about how you would expect the implementation to work.
Suppose you have
<pre>
exec { unzip_config:
creates => '/etc/foo'
}
service { foo:
subscribe => File['/etc/foo']
}
</pre>
What should happen when the exec completes but `/etc/foo` is still absent?
Should puppet now implicitly create it? This can be tricky because puppet will
not know if it is supposed to be a directory or a file and stuff can horribly
break if it picks the wrong one. Or should the subscribe to `File['/etc/foo']`
be implicitly changed to subscribe to `Exec['unzip_config']`?
I am asking because I actually have seen an exec resource specify `creates`
without actually creating it. Take this manifest:
<pre>
exec { 'do_step_one'
creates => '/tmp/last_step_completed',
}
exec { 'do_step_two'
creates => '/tmp/last_step_completed',
}
</pre>
Now suppose the first exec does not write a file but the second one does. The
intention of the above manifest is to make sure that if the first step
completes successful and the second step does not, puppet will try both steps
again in the next run. I saw people using that pattern and I am not sure how
this pattern and your request can work together nicely?
So for now I do agree with John and would say that if the file an exec creates
is actually relevant to other resources (to build up dependencies or notifies)
there should be an extra file resource for it. But I am open for suggestions if
you think otherwise
----------------------------------------
Feature #2762: Exec's "creates" should be a referencable resource.
https://projects.puppetlabs.com/issues/2762#change-82359
Author: Alex Urbanowicz
Status: Needs More Information
Priority: Normal
Assignee: Alex Urbanowicz
Category: exec
Target version:
Affected Puppet version: 0.25.1
Keywords: exec file provisioning relationship dependency
Branch:
Currently Exec's creates value can't be required or subscribed to. It should be
treated as normal File resource so there could be different method of
provisioning it without changing relations tied to the result file and not to
the "source" Exec (or other method depending on some outside factor).
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.