Hi, probably a bit noobish question, but browsing docs and googling didn''t provide an answer for my problem, so maybe someone here can help. I have a modules for managing users layout something like this (named ''users'') account.pp init.pp usergroup-a.pp usergroup-b.pp account.pp is where is define my resource define users::account (...) { .... } usergroup-a.pp and usergroup-b.pp are where I define some actual users, wrapped in classes: class users::usergroup-a { @account { ... } } init.pp is simply: import ''account'' class users { include users::usergroup-a include users::usergroup-b } But when I try to realize users in my nodes.pp the following does not work node ''x'' { include users realize ( Account[username] ) } (neither Account <| title == ''username'' |> The following, however, works for some reason: class users::group-a { include users realize( Account[''username'']) } node ''x'' { include users::group-a } Probably something really simple, but I don''t see what. I''m using debian and its version 2.6.2 of puppet. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, Instead of using ''import account'' in your init.pp - use ''include'' instead. Cheers, Den On 15/09/2011, at 23:46, isido <ilja.sidoroff@gmail.com> wrote:> Hi, > > probably a bit noobish question, but browsing docs and googling didn''t > provide an answer for my problem, so maybe someone here can help. > > I have a modules for managing users layout something like this (named > ''users'') > > account.pp > init.pp > usergroup-a.pp > usergroup-b.pp > > account.pp is where is define my resource > > define users::account (...) { .... } > > usergroup-a.pp and usergroup-b.pp are where I define some actual > users, wrapped in classes: > > class users::usergroup-a { > @account { ... } > } > > init.pp is simply: > > import ''account'' > > class users { > include users::usergroup-a > include users::usergroup-b > } > > But when I try to realize users in my nodes.pp the following does not > work > > node ''x'' { > include users > realize ( Account[username] ) > } > > (neither Account <| title == ''username'' |> > > The following, however, works for some reason: > > class users::group-a { > include users > realize( Account[''username'']) > } > > node ''x'' { > include users::group-a > } > > Probably something really simple, but I don''t see what. I''m using > debian and its version 2.6.2 of puppet. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Sep 16, 2:55 am, Denmat <tu2bg...@gmail.com> wrote:> Hi, > > Instead of using ''import account'' in your init.pp - use ''include'' instead. >Hmm. That didn''t help, but then I found this bug: http://groups.google.com/group/puppet-bugs/browse_thread/thread/889e0e9ded03c27b -- capitalizing names helped; realize ( Users::Account[''username''] ) works now. Ilja -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.