diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cloudstack_sshkey.py b/lib/ansible/modules/extras/cloud/cloudstack/cloudstack_sshkey.py index 414ded6c971..97d6a222f09 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