On Jun 7, 8:29 am, Jistan Idiot wrote:
So I discovered yesterday that if puppet changes the gid of a group it
doesn't go through the file system and update them with the new correct gid
(at least this was the case on RHEL5 and client puppet v2.6.16 and
puppetmaster 2.7.12).  Now I thought that it might be possible to have
puppet execute something like find  /home/ -group <old_gid> | xargs chgrp
groupname.  However it isn't quite that simple.  First it needs to be run
after the change, so I had to put it in a new stage that runs after main.
After that everything was all good.

I have some issues with this solution.  First the find takes forever to
run.  I'm not sure there's any way around this.

Second, it required some manual intervention and foreknowledge of the
problem.  What if I don't know someone had manually created a group with
the wrong gid?   I was thinking maybe creating a custom function that could
be called whenever there's a refresh on a group and use the old and new
gids to run the command.  Hopefully someone can show me how to do this as I
haven't figured it out (and not sure it is a good way to do this).

Finally, I don't think this is going to work for the next thing I want to
tackle.  I have a group of websevers that I'm going to start managing with
puppet.  The uids and gids are not consistent across them.  I'm going to
want puppet to fix that since there are way too many to do manually.

For example:

groupname  old_gid new_gid
groupA         1572    1863
groupB         1861    1572
groupC         1863    1861

I'm thinking that would just be a horrible nightmare with what I did
before.  In this example all the old 1572 items would be 1863 when the fix
for groupC is run. Is there some way to fix this problem?

Thanks in advance.
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

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 5 | next ›
Discussion Overview
grouppuppet-users @
postedJun 7, '12 at 1:29p
activeJun 8, '12 at 6:10p



site design / logo © 2022 Grokbase