There is no user type declared in the users class. Perhaps move the user
type call out of the adm_user define.
 On 9 Mar 2013 17:57, "mike" <miguelc...@gmail.com> wrote:

> Hi guys,
> I need help with the class, i have created my class (users) but when i
> apply from agent apers the next error:
>
> [................]
> [root@nodo1 ~]# puppet agent --test --verbose --noop
> Info: Retrieving plugin
> Info: Caching catalog for nodo1.example.com
> Error: Failed to apply catalog: Could not find dependency User[mike] for
> File[/home/mike]
> [................]
>
>
> My class is:
>
> [................]
> class users($user,$uid) {
>
> group { "Administracion" :
>     gid    => 3000,
> }
>
>   define adm_user ($user,$uid) {
>         user { "$user" :
>                 ensure  => present,
> home    => "/home/$user",
>                 owner   => "$user",
>                 group   => "$user",
>                 mode    => 0600,
>  uid => "$uid",
>         gid => "Administracion",
> require => Group[Administracion],
>             }
>         }
>
> file { "/home/$user":
>     ensure => "directory",
> owner   => $user,
>                 group   => $user,
> mode    => 0664,
> require => User[$user],
> }
>
> file { "/home/$user/.ssh/":
>     ensure => "directory",
> owner   => $user,
>                 group   => $user,
> mode    => 0664,
> require => File["/home/$user"]
> }
>
>  file { "/home/$user/.ssh/id_rsa.pub":
>                 ensure  => present,
>                 source  => "puppet:///modules/users/$user/id_rsa.pub",
>                 owner   => $user,
>                 group   => $user,
>                 mode    => 0600,
>         }
> }
> [................]
>
> My class intance (inside site.pp)
>
> node 'nodo1.example.com' {
> class { 'users': user => 'elmo', uid  => '9000',}
> }
>
> ¿What's the Problem?
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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


Reply via email to