Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running puppet open source 3.1.0 from the puppetlabs repos on RedHat Enterprise Linux 6 and using hiera 1.1.2. I'm running into what seems like either a bug or a fundamental misunderstanding on my part of how hiera works with parameterized classes. I've set up a parameterized subclass with a default value. I'm trying to set the value to a different one on a particular node. The node is declared in one of the main manifests without classes, and I have hiera_include('classes') in that manifest. I'm trying to change the value of the "activate" parameter in the "my_firewall" class. When my hiera node file looks like this:

---
classes:
  - puppetmaster
rel::auth_users: ['puppet']
rel::my_firewall::activate: false 

rel::my_firewall does not even load (I have notifies for the two boolean values of "activate" and don't see them). The rel::auth_users parameter gets passed fine. The rel class is defined in a parent in hiera.

When I change it to this:

---
classes:
  - puppetmaster
  - rel::my_firewall
rel::auth_users: ['puppet']
rel::my_firewall::activate: false 

It loads the rel::my_firewall class but uses the default value, not the false value.

As a sanity check, when I define things in the normal way in the node manifest, things work fine:

node 'puppet.my.domain' {
  class { 'rel::my_firewall':
    activate => false,
  }
}

properly declares the class and sets activate to false.

Am I doing things wrong? Is my syntax off? Any help would be awesome.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Syntax looks good. Looks like bug 17474 - the false value isn't loading correctly.

As a workaround until 3.2 is out, maybe use a string?

share|improve this answer
    
Aha! Thanks, that was driving me crazy, it's good to know it's just a bug. I'd almost started switching to a string boolean and then decided it was just wrong . . . oh well. –  Nat Baldwin May 13 '13 at 21:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.