Ask Your Question

puppetlabs account : create user from hiera

asked 2018-08-06 05:30:58 -0600

romgo gravatar image


I try to create a user using the puppetlabs account module from the forge. In my hiera data I use the following :

    comment: 'test'
    uid: '1000'

But on my host nothing happen, user isn't created. Note that on my node defintion I couldn't add : include accounts

because this module doesn't have a class, just defined types.

Any idea on how to create users froms hiera with this module ?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-06 05:43:58 -0600

romgo gravatar image

I found this solution in my node definition I add this :

create_resources('accounts::user', hiera_hash('accounts::user'))

Not really sure if this is the good way to do this but it works.

edit flag offensive delete link more


Yes that is correct, and I see that it's mentioned in the changelog of the puppetlabs/accounts forge module. However, the hiera_hash function is deprecated in recent versions of Puppet. You may want to consider using lookup() instead of hiera_hash().

sirinek gravatar imagesirinek ( 2018-08-07 08:42:02 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-08-06 05:30:58 -0600

Seen: 137 times

Last updated: Aug 06