mirror of https://github.com/ceph/ceph-ansible.git
ceph-key: check for key existance on absent state
check if the key is exists before removal. Signed-off-by: Seena Fallah <seenafallah@gmail.com>pull/7566/head
parent
7016c6df3c
commit
52365166a4
|
@ -617,11 +617,12 @@ def run_module():
|
|||
changed = True
|
||||
|
||||
elif state == "absent":
|
||||
if key_exist == 0:
|
||||
rc, cmd, out, err = exec_commands(
|
||||
module, info_key(cluster, name, user, user_key_path, output_format, container_image)) # noqa: E501
|
||||
if rc == 0:
|
||||
rc, cmd, out, err = exec_commands(
|
||||
module, delete_key(cluster, user, user_key_path, name, container_image)) # noqa: E501
|
||||
if rc == 0:
|
||||
changed = True
|
||||
changed = True
|
||||
else:
|
||||
rc = 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue