user ensure absent :No command localdelete defined for provider

45 views
Skip to first unread message

Andreas Dvorak

unread,
Nov 3, 2014, 11:16:29 AM11/3/14
to puppet...@googlegroups.com
Dear all,

I have a modul accounts to create user. That is working fine. Today I would like to remove a user but it does not work.
Unfortunately I don't understand the error. Can you please have a look?

Error: No command localdelete defined for provider
Error: /Stage[main]/Accounts/Accounts::Virtual[testuser]/User[testuser]/ensure: change from present to absent failed: No command localdelete defined for provider

cat init.pp
class accounts {
  @accounts::virtual { 'testuser':
    ensure => absent,
    comment  => 'testuser',
    uid      => '1000',
    gid      => '1000',
    group    => 'testuser',
  }
....
}

define accounts::virtual (
  $ensure        = present,
  $comment       = undef,
  $uid           = undef,
  $home          = undef,
  $group         = undef,
  $gid           = undef,
  $password      = undef,
  $shell         = '/bin/bash',
  $sshkeytype    = 'rsa',
  $sshkey        = undef,
  $sol10_profile = undef,
  $sol11_profile = undef,
  ) {
  include accounts::groups

  $username = $title

  user { $username:
    ensure     => $ensure,
    comment    => $comment,
    uid        => $uid,
    gid        => $gid,
    shell      => $shell,
    home       => $home_dir,
    managehome => true,
    forcelocal => true,
    password   => $password,
  }
....
}

Best regards,
Andreas

jcbollinger

unread,
Nov 3, 2014, 2:36:47 PM11/3/14
to puppet...@googlegroups.com


It looks like the 'provider' chosen for the User type on the affected node(s) does not support deleting (local) users.  That could be a bug, but it might just be a limitation of the node's environment.  What is the node's OS?


John

Andreas Dvorak

unread,
Nov 3, 2014, 2:42:19 PM11/3/14
to puppet...@googlegroups.com
Hi John,

the OS is RedHat 5 and 6.

Regards
Andreas

Nan Liu

unread,
Nov 3, 2014, 7:44:19 PM11/3/14
to puppet...@googlegroups.com
On Mon, Nov 3, 2014 at 3:16 AM, Andreas Dvorak <andreas...@gmail.com> wrote:
I have a modul accounts to create user. That is working fine. Today I would like to remove a user but it does not work.
Unfortunately I don't understand the error. Can you please have a look?

Error: No command localdelete defined for provider
Error: /Stage[main]/Accounts/Accounts::Virtual[testuser]/User[testuser]/ensure: change from present to absent failed: No command localdelete defined for provider

Sounds like a bug resolved by PUP-1510.
https://github.com/puppetlabs/puppet/pull/2300

Nan 

Andreas Dvorak

unread,
Nov 4, 2014, 8:29:37 AM11/4/14
to puppet...@googlegroups.com
Hi Nan,

yes it really looks like that.
I have puppet versin 3.3.1, but don't see an information in which version it is solved.

Andreas
Reply all
Reply to author
Forward
0 new messages