Problem whit puppet module

111 views
Skip to first unread message

joan.mass...@gmail.com

unread,
May 16, 2014, 9:49:52 AM5/16/14
to puppet...@googlegroups.com
Hello
I have a local puppet client installed in my machine.
I downolad https://github.com/swanke/puppet-users.git to manage linux users
I try to do a probe with the test folder:
 puppet apply /root/git/puppet-users/tests/init.pp
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type users::group at /root/git/puppet-users/tests/init.pp:6 on node puppet.client.com
Wrapped exception:
Invalid resource type users::group
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type users::group at /root/git/puppet-users/tests/init.pp:6 on node puppet.client.com

Inside test folder have 3 files:
init.pp
  #class { 'users': }
class users {}
users::group { 'phononet':
  ensure => $user1_ensure,
  gid    => '555',
}

$user1          = 'hugo'
$user1_uid      = 1030
$user1_gid      = undef
$user1_home     = '/home'
$user1_ensure   = 'absent'
$user1_groups   = [ 'sudo', 'adm', 'phononet' ]
$user1_sshkey   = '# Managed by Puppet'
$user1_comment  = 'Hugo'
$user1_password = '!'

$user2          = 'fritz'
$user2_uid      = 1012
$user2_gid      = 1012
$user2_home     = '/home'
$user2_ensure   = 'absent'
$user2_groups   = [ 'sudo', 'adm' ]
$user2_sshkey   = '# Managed by Puppet'
$user2_comment  = 'Fritz'
$user2_password = '!'

# user1 configuration
users::user { $user1:
  ensure   => $user1_ensure,
  uid      => $user1_uid,
  home     => $user1_home,
  groups   => $user1_groups,
  comment  => $user1_comment,
  password => $user1_password,
}
users::home { $user1:
  ensure => $user1_ensure,
  force  => true,
}
users::ssh { $user1:
  ensure => $user1_ensure,
  home   => $user1_home,
  sshkey => $user1_sshkey,
}

# user2 configuration
users::user { $user2:
  ensure   => $user2_ensure,
  uid      => $user2_uid,
  home     => $user2_home,
  groups   => $user2_groups,
  comment  => $user2_comment,
  password => $user2_password,
}
users::home { $user2:
  ensure => $user2_ensure,
  force  => true,
}
users::ssh { $user2:
  ensure => $user2_ensure,
  home   => $user2_home,
  sshkey => $user2_sshkey,
}

user.pp
users::user { 'hans':
  ensure  => 'present',
  uid     => '1024',
  groups  => [ 'adm' ],

}

group.pp
users::group { 'hans':
  ensure => 'present',
  gid    => '1025',
}


Why doesn't find the  resource type users::group?. The file group.pp exists..
Thanks


David Schmitt

unread,
May 18, 2014, 7:32:01 AM5/18/14
to puppet...@googlegroups.com
On 2014-05-16 15:49, joan.mass...@gmail.com wrote:
> Hello
> I have a local puppet client installed in my machine.
> I downolad https://github.com/swanke/puppet-users.git to manage linux users
> I try to do a probe with the test folder:
> puppet apply /root/git/puppet-users/tests/init.pp
> Error: Puppet::Parser::AST::Resource failed with error ArgumentError:
> Invalid resource type users::group at
> /root/git/puppet-users/tests/init.pp:6 on node puppet.client.com
> Wrapped exception:
> Invalid resource type users::group
> Error: Puppet::Parser::AST::Resource failed with error ArgumentError:
> Invalid resource type users::group at
> /root/git/puppet-users/tests/init.pp:6 on node puppet.client.com
>
> Inside test folder have 3 files:
> init.pp
> #class { 'users': }
> class users {}
> users::group { 'phononet':
> ensure => $user1_ensure,
> gid => '555',
> }
[...]
> user.pp
> users::user { 'hans':
> ensure => 'present',
> uid => '1024',
> groups => [ 'adm' ],
> }
>
> group.pp
> users::group { 'hans':
> ensure => 'present',
> gid => '1025',
> }
>
> Why doesn't find the resource type users::group?. The file group.pp
> exists..

Your group.pp contains a resource, not a define. Puppet doesn't know
what to do.

Please look in the Language Guide for details on defining custom resources:

> http://docs.puppetlabs.com/puppet/latest/reference/lang_defined_types.html




Regards, David

Reply all
Reply to author
Forward
0 new messages