Dears all, I''m trying update user''s membership group deleting users from some groups. To do it i took exec way doing : exec { "deluser ${username} ${group}": I''m thinking might be there is more elegant solution without using exec type . Is there another way to do it ?. Thanks in advanced. eduardo. -- 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 eduardo,> Is there another way to do it ?. >user { "$username": ensure => present, key_membership => inclusive, groups => [''all'', ''groups'', ''except'', ''$group''], # full listing of all groups $username belongs to } or group { "$group", ensure => present, attribute_membership => inclusive, members => [''all'', ''members'', ''except'', ''$username''], # full listing of all members of $group } Cheers, Paul -- 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/-/vByKYwcuRhoJ. 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 Paul, thanks you for your suggestion. I wrote key_membership => inclusive in user type, but the groups were not updated. Having user''s membership into array variable $groups i did : user { $username: ... key_membership => inclusive, groups => [$groups] } am i missing something ? I have puppet version 2.7.1. Regards, eduardo. On 23 jul, 02:05, Paul Tötterman <paul.totter...@gmail.com> wrote:> Hi eduardo, > > > Is there another way to do it ?. > > user { "$username": > ensure => present, > key_membership => inclusive, > groups => [''all'', ''groups'', ''except'', ''$group''], # full listing of all > groups $username belongs to > > } > > or > > group { "$group", > ensure => present, > attribute_membership => inclusive, > members => [''all'', ''members'', ''except'', ''$username''], # full listing of > all members of $group > > } > > Cheers, > Paul-- 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 Paul, I found note in http://projects.puppetlabs.com/issues/7241. So I can do it using membership => inclusive (instead of key_membership) I appreciate your help. Regards, eduardo. On 23 jul, 02:05, Paul Tötterman <paul.totter...@gmail.com> wrote:> Hi eduardo, > > > Is there another way to do it ?. > > user { "$username": > ensure => present, > key_membership => inclusive, > groups => [''all'', ''groups'', ''except'', ''$group''], # full listing of all > groups $username belongs to > > } > > or > > group { "$group", > ensure => present, > attribute_membership => inclusive, > members => [''all'', ''members'', ''except'', ''$username''], # full listing of > all members of $group > > } > > Cheers, > Paul-- 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.
> > So I can do it using membership => inclusive (instead of > key_membership) >You''re right, I took a too quick look at http://docs.puppetlabs.com/references/latest/type.html Cheers, Paul -- 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/-/_IDdwPBLqGoJ. 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.