Hiera not overriding values from the Hierarchy files

110 views
Skip to first unread message

linuxbsdfreak

unread,
Aug 20, 2012, 5:21:44 AM8/20/12
to puppet...@googlegroups.com
Hi All,

I am facing a real issue with hiera not picking values from the Hierarchy i have set in hiera,yaml.

For Eg: I have set the following in hiera.yaml

---
:backends:
     - yaml

:logger: console

:hierarchy:
          - %{operatingsystem}
          - common

:yaml:
    :datadir: '/etc/puppet/hieradata'

- In CentOS.yaml i have the following

---

hsflowd_port: 6078

In common.yaml
---

## Hsflowd
hsflowd_user: root
hsflowd_group: root
hsflowd_config_dir: /etc
hsflowd_package: hsflowd
hsflowd_service: hsflowd
hsflowd_port: 8080

- I have the following in the module manifest

class hsflowd::config(
  $hsflowd_user       = hiera('hsflowd_user'),
  $hsflowd_group      = hiera('hsflowd_group'),
  $hsflowd_config_dir = hiera('hsflowd_config_dir'),
  $hsflowd_port      = hiera('hsflowd_port'),
)

{
        file {
          "${hsflowd_config_dir}/hsflowd.conf":
                ensure  => present,
                content => template("${module_name}/hsflowd.conf.erb"),
                owner   => $hsflowd_user,
                group   => $hsflowd_group,
                mode    => '0644';
}

The value is always set to 8080 above and not 6078.  I am clueless to debug the issue and exhausted all my options.

I am using hiera - 0.3.0 and ruby 1.9.3.

The overriding values is not working. Anyone facing this issue?

Regards,
Kevin


linuxbsdfreak

unread,
Aug 21, 2012, 1:15:03 PM8/21/12
to puppet...@googlegroups.com
 
Hi All,
 
Can anyone help debug this issue with hiera? I am unable to get hiera to work with puppet as expected.
 
Regards,
Kevin

R.I.Pienaar

unread,
Aug 21, 2012, 1:39:37 PM8/21/12
to puppet...@googlegroups.com


----- Original Message -----
> From: "linuxbsdfreak" <linuxb...@gmail.com>
> To: puppet...@googlegroups.com
> Sent: Tuesday, August 21, 2012 6:15:03 PM
> Subject: [Puppet Users] Re: Hiera not overriding values from the Hierarchy files
>
>
>
> Hi All,
>
> Can anyone help debug this issue with hiera? I am unable to get hiera
> to work with puppet as expected.

if you run your master with debug logging you'll be able to see how hiera interprets
your facts and hierarchy and in what files its looking.

this might be a 1.9.3 issue there used to be some bugs I dont recall what version
fixed them.
Reply all
Reply to author
Forward
0 new messages