FAQ
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.

Search Discussions

  • Paul Tötterman at Jul 23, 2012 at 6:05 am
    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.
  • Eduardo at Jul 23, 2012 at 12:27 pm
    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 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.
  • Eduardo at Jul 23, 2012 at 12:59 pm
    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 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.
  • Paul Tötterman at Jul 24, 2012 at 10:41 am

    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJul 22, '12 at 11:13p
activeJul 24, '12 at 10:41a
posts5
users2
websitepuppetlabs.com

2 users in discussion

Eduardo: 3 posts Paul Tötterman: 2 posts

People

Translate

site design / logo © 2022 Grokbase