Issue #7974 has been reported by Jamison Fryman.
----------------------------------------
Feature #7974: Stages should reload facts between runs
https://projects.puppetlabs.com/issues/7974
Author: Jamison Fryman
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
During a stage run, I might have some data in the form of a fact that will not
be populated until future runs of puppet. Consider the below example. In this
case, the logic in `class bar` will not be evaluated during the initial run of
puppet until `/etc/ROLE` has been defined and populated on the machine.
Custom Fact:
<pre><code class='ruby'>
Facter.add("role") do
setcode do
%x{/etc/ROLE -i}.chomp
end
end
</code></pre>
Puppet Code:
<pre><code class='puppet'>
class stage {
stage { ['pre', 'post']: }
Stage['pre'] -> Stage['main'] -> Stage['post']
}
class foo {
file { '/etc/ROLE':
ensure => file,
content => 'FS',
}
}
class bar {
if $role == 'FS' { (do something ) }
}
</code></pre>
Node Definition
<pre><code>
node 'test' {
class { 'foo':
stage => 'pre',
}
include bar
}
</code></pre>
--
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.