Issue #8174 has been updated by Nick Fagerlund.
Status changed from Unreviewed to Needs More Information
I can't make this work the way you describe. Here's what I've got:
My ENC:
#!/usr/bin/env perl
use strict;
use warnings;
my $yaml = <<EOT;
---
classes:
templator:
parameters:
thevar: "Set from ENC."
EOT
print $yaml;
modules/templator/manifests/init.pp:
class templator {
file {'/tmp/templator.txt':
content => template("templator/text.erb"),
ensure => file,
}
notify {'nemplator':
message => "Testing issue 8174. FQDN is $fqdn and OS is
$operatingsystem",
}
}
modules/templator/templates/text.erb:
Text file for temp, coming right up! Here's the var:
<%= scope.lookupvar("::thevar") %>
Also, here's a fact:
<%= fqdn %>
And here's a top scope var:
<%= randomtopscopevar %>
>From what you said, I should be getting scope lookup warnings from the notify
>and probably the template, but it's not throwing any warnings at all. Am I
>missing something? What're the differences between your case and my test case?
----------------------------------------
Bug #8174: External Node Classifer makes puppet think Facter variables are
dynamic lookup issues
https://projects.puppetlabs.com/issues/8174
Author: Chuck Schweizer
Status: Needs More Information
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version: 2.7.1
Keywords:
Branch:
I have found that if your class is part of the External Node Classifier
definition puppet 2.7.1 thinks variables from Facter are dynamic lookups.
EG.
External config
---
classes:
- hadoop
environment: production
parameters:
puppetmaster: puppet
Dynamic lookup of $operatingsystem at
/var/opt/puppet/environments/production/modules/hadoop/manifests/base.pp:53 is
deprecated. Support will be removed in Puppet 2.8. Use a fully-qualified
variable name (e.g., $classname::variable) or parameterized classes.
$ facter operatingsystem
RedHat
--
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.