On Thu, Oct 25, 2012 at 04:34:26PM -0700, Ben McCann wrote:
> Yes, I am realizing it:
> Users::Virtual::Localuser <| gid == users |>
>
> If I go onto the host and delete the user (sudo userdel myuser) then puppet
> will create a new user and that user will be a member of all the groups I
> desire:
> notice:
> /Stage[main]/Users/Users::Virtual::Localuser[myuser]/User[myuser]/ensure:
> created
> notice: Finished catalog run in 0.43 second
>
> However, if I delete the user from the group (sudo gpasswd -d myuser
> mygroup) and rerun then puppet does not re-add the group membership:
> notice: Finished catalog run in 0.34 seconds
>
> This seems like a bug in puppet perhaps?
>
> Thanks,
> Ben
Are you sure you have not defined the user resource a second time in
another location? Because
Users::Virtual::Localuser <| gid == users |>
will realize nothing because your localuser define does not have a gid
parameter (the user resource inside the define does, but that does not
matter here).
-Stefan