How to manage users account using Hiera without create_ressources ?

asked 2014-03-06 10:41:09 -0500

wuma1002 gravatar image

We try to create our users via hiera. Currently we have implemented the users in a module like this:

user::managed  { 'user1': 
         name_comment   => 'Comment1',
         uid                      => 123,
         gid                      => $someVariable,
         manage_gropus   => $someVariable,
         groups                => $someVariable,
         sshkey_source     => 'some/random/path/user1_rsa.pub',
         password            => 'NOPW'
}

We use this code for every user and we have a lot :) Now I like to use hiera to provide the users data. My problem is I need something that I can pass the single proberties of one user to my user module and it would be nice if someone has an idee to shorten the code.

The hiera looks ... (more)

edit retag flag offensive close merge delete

Comments

Why not use create_resources? You already have all the pieces it needs.

ramindk gravatar imageramindk ( 2014-03-07 13:14:47 -0500 )edit

I need to work with my variables from the users for other modules. If i can work with the variables using create_resources, i'll use create_ressources. For example depending on ...(more)

wuma1002 gravatar imagewuma1002 ( 2014-03-10 04:59:14 -0500 )edit