Fix delete syntax
@@ -74,15 +74,11 @@ def hashivault_delete(params):
try:
if version == 2:
if permanent:
- returned_data = client.secrets.kv.v2.delete_metadata_and_all_versions(
- secret,
- mount_point=mount_point
- )
+ returned_data = client.secrets.kv.v2.delete_metadata_and_all_versions(secret, mount_point=mount_point)
else:
- returned_data = client.secrets.kv.v2.delete_latest_version_of_secret(
- secret,
- mount_point=mount_point
- ) else:
+ returned_data = client.secrets.kv.v2.delete_latest_version_of_secret(secret, mount_point=mount_point)
+ else:
+ returned_data = client.secrets.kv.v1.delete_secret(secret, mount_point=mount_point)
except InvalidPath:
result['msg'] = u"Secret %s nonexistent" % secret_path
result['changed'] = False
