You might look into the create_resources function. The example given is creating users even.
http://docs.puppetlabs.com/references/latest/function.html#createresources On Monday, November 26, 2012 3:00:17 AM UTC-8, AnOnJoe wrote: > > Hello, > I have recently discover hiera, and I would like to use it for creating > users on my node. > > I first think of someting like that : > > > common.yaml > >> lusers : - jodoe >> - jadoe >> > classes : - users >> > > > serv01.foo.com.yaml > >> lusers : - Alice >> - Bob >> > > > modules/users/manifest/init.pp > >> define users ($user = hiera("$lusers")) { >> user { "$user": >> ensure => present, >> shell => '/bin/bash', >> home => "/home/$user", >> managehome => true, >> } >> } >> > > But I don't know how I can call my def type like that. > > What about you ? How do you create your users in puppet / hiera ? > > Thx > > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/i4IfAKLco48J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.