Cleaned up nova_compute documentation

Added version_added tags as well as a few more examples.
pull/8412/head
Monty Taylor 10 years ago
parent b80be42ed9
commit c6975552d7

@ -82,9 +82,11 @@ options:
- The name of the base image to boot. Mutually exclusive with image_id - The name of the base image to boot. Mutually exclusive with image_id
required: true required: true
default: None default: None
version_added: "1.7"
image_filter: image_filter:
description: description:
- Text to use to filter image names, for the case, such as HP, where there are multiple image names matching the common identifying portions. image_filter is a negative match filter - it is text that may not exist in the image name. Defaults to "(deprecated)" - Text to use to filter image names, for the case, such as HP, where there are multiple image names matching the common identifying portions. image_filter is a negative match filter - it is text that may not exist in the image name. Defaults to "(deprecated)"
version_added: "1.7"
flavor_id: flavor_id:
description: description:
- The id of the flavor in which the new VM has to be created. Mutually exclusive with flavor_ram - The id of the flavor in which the new VM has to be created. Mutually exclusive with flavor_ram
@ -95,9 +97,11 @@ options:
- The minimum amount of ram in MB that the flavor in which the new VM has to be created must have. Mutually exclusive with flavor_id - The minimum amount of ram in MB that the flavor in which the new VM has to be created must have. Mutually exclusive with flavor_id
required: false required: false
default: 1 default: 1
version_added: "1.7"
flavor_filter: flavor_filter:
description: description:
- Text to use to filter flavor names, for the case, such as Rackspace, where there are multiple flavors that have the same ram count. flavor_filter is a positive match filter - it must exist in the flavor name. - Text to use to filter flavor names, for the case, such as Rackspace, where there are multiple flavors that have the same ram count. flavor_filter is a positive match filter - it must exist in the flavor name.
version_added: "1.7"
key_name: key_name:
description: description:
- The key pair name to be used when creating a VM - The key pair name to be used when creating a VM
@ -118,21 +122,25 @@ options:
- Should a floating ip be auto created and assigned - Should a floating ip be auto created and assigned
required: false required: false
default: 'yes' default: 'yes'
version_added: "1.7"
floating_ips: floating_ips:
decription: decription:
- list of valid floating IPs that pre-exist to assign to this node - list of valid floating IPs that pre-exist to assign to this node
required: false required: false
default: None default: None
version_added: "1.7"
floating_ip_pools: floating_ip_pools:
description: description:
- list of floating IP pools from which to choose a floating IP - list of floating IP pools from which to choose a floating IP
required: false required: false
default: None default: None
version_added: "1.7"
availability_zone: availability_zone:
description: description:
- Name of the availability zone - Name of the availability zone
required: false required: false
default: None default: None
version_added: "1.7"
meta: meta:
description: description:
- A list of key value pairs that should be provided as a metadata to the new VM - A list of key value pairs that should be provided as a metadata to the new VM
@ -194,15 +202,62 @@ EXAMPLES = '''
wait_for: 200 wait_for: 200
flavor_id: 101 flavor_id: 101
security_groups: default security_groups: default
floating_ip: auto_floating_ip: yes
auto: True
# If one wants to specify a floating ip to use: # Creates a new VM in HP Cloud AE1 region availability zone az2 and assigns a pre-known floating IP
<snip> - name: launch a nova instance
floating_ip: hosts: localhost
ips: tasks:
- 15.126.238.160 - name: launch an instance
nova_compute:
state: present
login_username: username
login_password: Equality7-2521
login_tenant_name: username-project1
name: vm1
auth_url: https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/
region_name: region-b.geo-1
availability_zone: az2
image_id: 9302692b-b787-4b52-a3a6-daebb79cb498
key_name: test
wait_for: 200
flavor_id: 101
floating-ips:
- 12.34.56.79
# Creates a new VM with 4G of RAM on Ubuntu Trusty, ignoring deprecated images
- name: launch a nova instance
hosts: localhost
tasks:
- name: launch an instance
nova_compute:
name: vm1
state: present
login_username: username
login_password: Equality7-2521
login_tenant_name: username-project1
auth_url: https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/
region_name: region-b.geo-1
image_name: Ubuntu Server 14.04
image_filter: deprecated
flavor_ram: 4096
# Creates a new VM with 4G of RAM on Ubuntu Trusty on a Rackspace Performance node in DFW
- name: launch a nova instance
hosts: localhost
tasks:
- name: launch an instance
nova_compute:
name: vm1
state: present
login_username: username
login_password: Equality7-2521
login_tenant_name: username-project1
auth_url: https://identity.api.rackspacecloud.com/v2.0/
region_name: DFW
image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
flavor_ram: 4096
flavor_filter: Performance
''' '''

Loading…
Cancel
Save