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