Issue #21186 has been updated by Ti Leggett. Status changed from Needs More Information to Closed
What's all this egg doing on my face? I can't believe I totally missed that. Thanks for a quick fix for this 'bug'. Now where's that hole I can go crawl in... ---------------------------------------- Bug #21186: Hiera YAML False Bug https://projects.puppetlabs.com/issues/21186#change-92757 * Author: Ti Leggett * Status: Closed * Priority: Normal * Assignee: Ti Leggett * Category: * Target version: * Affected Puppet version: 3.2.1 * Keywords: Hiera YAML boolean * Branch: ---------------------------------------- It seems puppet thinks that variables evaluate to true even when they are explicitly set to false in hiera YAML. In my searching it seems like this should be fixed but with hiera 1.2.1 and puppet 3.2.1 I'm still seeing this. In my YAML I have: <pre> # Java directives java : enable_jdk : false # Install the JDK as well as the JRE enable_v6 : true # Install Java 6 enable_v7 : false # Install Java 7 openjdk : true # Install OpenJDK sun : false # Install Sun </pre> And in one of my manifests I do something like: <pre> class java::install ( $parameters = hiera('java', []), ) { if $parameters['openjdk'] == true { if $parameters['enable_v6'] == true and $java::params::openjdk_6_jre { package { $java::params::openjdk_6_jre: ensure => latest, } if $parameters['enable_jdk'] == true and $java::params::openjdk_6_jdk { package { $java::params::openjdk_6_jdk: ensure => latest, } } } … </pre> No matter what it thinks it should install the JDK package even though the parameter is set to false. I've tried setting it 0, False, n, and N and it always evaluates to true. Is this a known bug and if so is there a workaround? -- 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.
