Issue #12695 has been reported by Jason Smith.
----------------------------------------
Bug #12695: Parameter value changed from On to true when using the external
node classifier.
https://projects.puppetlabs.com/issues/12695
Author: Jason Smith
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version: 2.6.13
Keywords:
Branch:
I recently noticed that when using the puppet external node classifier with our
own database and custom script to output YAML, if a parameter has a value of
**On**, it will be changed to **true** when the manifest is run on the node. I
tried several other values, including **Off** and none were changed, only
**On**. The script we are using doesn't quote the YAML strings by default, but
as a work-around for this, I found an option for the YAML library which makes
it dump quoted strings. Using the puppet dashboard (version 1.1.1) does not
have a problem either since it seems to quote parameter value strings in the
YAML it outputs. Since I believe unquoted strings are allowed in YAML, this
must be a bug in puppet or a ruby library that it is using, so I figured I
would report it even though I found a way around it.
To reproduce this with a simple test case, I have a test module in our manifest
directory:
<pre>
# cat test/manifests/init.pp
class test {
$msg = "Test parameter: \$test_parameter=$test_parameter"
alert($msg)
notify { "test_parameter_value":
message => $msg,
}
}
</pre>
In our asset database, I have the classes and parameters configured so our
external node classifier produces this YAML output for my test node:
<pre>
---
classes:
- test
environment: testing
parameters:
test_parameter: On
</pre>
When running the above test manifest on our test node, I get this result:
<pre>
# puppet agent --test --environment=testing
info: Applying configuration version '2a3ead2'
notice: Test parameter: $test_parameter=true
notice: /Stage[main]/Test/Notify[test_parameter_value]/message: defined
'message' as 'Test parameter: $test_parameter=true'
notice: Finished catalog run in 0.38 seconds
</pre>
As you can see, the *test_parameter* value was changed from **On** to **true**.
--
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.