Brian Pitts
2010-Nov-18 23:33 UTC
[Puppet Users] plusignment to add values to a resource several times
Hi, Has any work been done or is any work being planned to allow plusignment to add values to a resource several times? This has been discussed before at https://groups.google.com/group/puppet-users/browse_thread/thread/b276948477fa14ae http://projects.puppetlabs.com/issues/2825 My immediate use case is the same as Bryan''s in the previous discussion. I would like to have puppet manage some users that represent human beings that logged in to systems, and I need to be able to add them to different combinations of groups on different systems. To make things clearer, I''ll paste Bryan''s test case below. node testnode { include user::groupA include user::groupB } class user::groupA inherits user::virtual { User["bryan"] { groups +> "groupA" } User["bob"] { groups +> "groupA" } realize( Group["groupA"], User["bryan"], User["bob"], ) } class user::groupB inherits user::virtual { User["harry"] { groups +> "groupB" } User["bryan"] { groups +> "groupB" } realize( Group["groupB"], User["harry"], User["bryan"], ) } class user::virtual { @user { "bryan": uid => 1001, gid => 1001, } @user { "bob": uid => 1002, gid => 1002, } @user { "harry": uid => 1003, gid => 1003, } } This fails with "Could not retrieve catalog: Parameter ''groups'' is already set on User[bryan] by user::groupA" in 0.24.8. I don''t have a newer puppet version to easily test with, unfortunately. -- Brian Pitts Systems Administrator | EuPathDB Bioinformatics Resource Center 706-542-1447 | bdp@uga.edu | http://eupathdb.org -- 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.
Vladimir Kulev
2011-Mar-04 16:03 UTC
[Puppet Users] Re: plusignment to add values to a resource several times
I have hit a similar issue. Does anybody know if this is going to be fixed or some workaround present? -- 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.
Felix Frank
2011-Mar-07 12:02 UTC
Re: [Puppet Users] Re: plusignment to add values to a resource several times
On 03/04/2011 05:03 PM, Vladimir Kulev wrote:> I have hit a similar issue. Does anybody know if this is going to be > fixed or some workaround present?I can reproduce with 2.6.4. Currently, your best bet is probably the wooden hammer approach. class user::groupA inherits user::virtual { User<| title == "bryan" |> { groups +> "groupA" } User<| title == "bob" |> { groups +> "groupA" } I''m not sure this works in 0.24.8. I strongly advice to move away from 0.24.x (are you on Debian 5?) under any circumstances (use backports etc.). This is rather fugly and your original approach should definitely work at some point as far as I''m concerned. Cheers, Felix -- 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.