mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
b225263279
commit
febbfa792f
1 changed files with 12 additions and 12 deletions
|
@ -394,6 +394,18 @@ def absent(name,
|
|||
'result': True,
|
||||
'comment': ''}
|
||||
|
||||
if __opts__['test']:
|
||||
ret['result'], ret['comment'] = _absent_test(
|
||||
user,
|
||||
name,
|
||||
enc,
|
||||
comment,
|
||||
options or [],
|
||||
source,
|
||||
config,
|
||||
)
|
||||
return ret
|
||||
|
||||
# Extract Key from file if source is present
|
||||
if source != '':
|
||||
key = __salt__['cp.get_file_str'](
|
||||
|
@ -438,18 +450,6 @@ def absent(name,
|
|||
comment = comps[2]
|
||||
ret['comment'] = __salt__['ssh.rm_auth_key'](user, name, config)
|
||||
|
||||
if __opts__['test']:
|
||||
ret['result'], ret['comment'] = _absent_test(
|
||||
user,
|
||||
name,
|
||||
enc,
|
||||
comment,
|
||||
options or [],
|
||||
source,
|
||||
config,
|
||||
)
|
||||
return ret
|
||||
|
||||
if ret['comment'] == 'User authorized keys file not present':
|
||||
ret['result'] = False
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue