Add this line to your user definition:

require => Group["policyd"]

That should work

On Wed, Mar 10, 2010 at 12:05 PM, janfrode <janfr...@tanso.net> wrote:
> Sorry, but it doesn't seem to be that simple. I just tried to include
> a class that does:
>
>    realize (
>        Group["policyd"],
>        User["policyd"]
>    )
>
> and see on the puppet client:
>
> Mar 10 12:00:16 asav puppetd[20247]: Starting Puppet client version
> 0.25.4
> Mar 10 12:00:31 asav puppetd[20247]: (//user::virtual/User[policyd]/
> ensure) change from absent to present failed: Could not create user
> policyd: Execution of '/usr/sbin/useradd -u 103 -g 103 -d /home/
> policyd -c Postfix Policy Daemon -s /bin/bash -M policyd' returned 6:
> useradd: unknown group 103
> Mar 10 12:00:32 asav puppetd[20247]: (//user::virtual/Group[policyd]/
> ensure) created
> Mar 10 12:00:33 asav puppetd[20247]: Finished catalog run in 6.58
> seconds
>
>
> So, it fails to create the user on first run.. but will of course
> succeed the next time since now the group is created... But how can I
> force group creation before user creation, when the order listed in
> realize() obviously doesn't matter.
>
>
>  -jf
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>



-- 

Cheers,

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to