W3cubDocs

/Ansible

nova_keypair - Add/Delete key pair from nova

DEPRECATED

Deprecated in 2.0. Use os_keypair instead

Synopsis

Add or Remove key pair from nova .

Requirements (on host that executes module)

  • python >= 2.6
  • python-novaclient

Options

parameter required default choices comments
auth_url
no http://127.0.0.1:35357/v2.0/
The keystone url for authentication
login_password
yes yes
Password of login user
login_tenant_name
yes yes
The tenant name of the login user
login_username
yes admin
login username to authenticate to keystone
name
yes None
Name that has to be given to the key pair
public_key
no None
The public key that would be uploaded to nova and injected to vm's upon creation
region_name
no None
Name of the region
state
no present
  • present
  • absent
Indicate desired state of the resource

Examples

# Creates a key pair with the running users public key
- nova_keypair: state=present login_username=admin
                login_password=admin login_tenant_name=admin name=ansible_key
                public_key={{ lookup('file','~/.ssh/id_rsa.pub') }}

# Creates a new key pair and the private key returned after the run.
- nova_keypair: state=present login_username=admin login_password=admin
                login_tenant_name=admin name=ansible_key

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/nova_keypair_module.html