diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cloudstack_sshkey.py b/lib/ansible/modules/extras/cloud/cloudstack/cloudstack_sshkey.py index 414ded6c97..97d6a222f0 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cloudstack_sshkey.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cloudstack_sshkey.py @@ -139,6 +139,7 @@ class AnsibleCloudStackSshKey(AnsibleCloudStack): self.result['changed'] = True args = {} args['name'] = self.module.params.get('name') + args['projectid'] = self.get_project_id() if not self.module.check_mode: res = self.cs.deleteSSHKeyPair(**args) return ssh_key