Hello, this is what it looks.

init.pp

class k5login(
  $principles = hiera_array('k5login::principles', [])
){
  validate_array($principles)

  file { '.k5login':
    ensure  => file,
    path    => '/root/.k5login',
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => template('k5login/k5login.erb'),
  }
}


Hierarchies:

:hierarchy:
  - "hosts/%{hostname}"
  - "environments/%{::environment}"
  - "regions/%{datacenter}"
  - global

global.yaml

k5login::principles:
  - user1/[email protected]
  - user2/[email protected]

environments/development.yaml
k5login::principles:
  - [email protected]

Now when i do puppet run, i get user3 in k5login, what i want is user1, 
user2, and user2 all.

Regards,
D



On Tuesday, 7 April 2015 12:46:54 UTC+5:30, Martin Alfke wrote:
>
>
> On 06 Apr 2015, at 17:35, Dhaval <[email protected] <javascript:>> wrote: 
>
> > hello, 
> > 
> > I am trying to develop puppet module for k5login entries .. now my 
> question is, how do i manage entries for multiple hierarchies ? 
> > 
> > currently when i try it, it picks up from where it finds entry first and 
> completes it, how do i get values so it creates an array from all 
> hierachies and then populates the k5login? 
> > 
> > i tried "deeper" merging and hiera_array, still not sure why it's not 
> working. anything special i need to do ? 
>
> Hi Dhaval, 
>
> it would be great if you can post the puppet code and your hiera data. 
> Otherwise people have to guess. 
>
> Best, 
>
> Martin 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/518957b5-0b9b-4df5-aff1-436c1a844224%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to