Examples syntax batch5 (#5622)

* Change example syntax on supervisorctl module

* Change example syntax or _ec2_ami_search module

* Change example syntax on cloudformation module

* Change example syntax on ec2 module

* Change example syntax on ec2_facts module

* Change example syntax on ec2_eip module

* Change example syntax on rds module

* Change example syntax on route53 module

* Change example syntax on s3 module

* Change example syntax on digital_ocean module

* Change example syntax on docker_service module

* Change example syntax on cloudformation module

* Change example syntax on gc_storage module

* Change example syntax on gce module

* Change example syntax on gce_mig module

* Change example syntax on _glance_image module

* Change example syntax on _keystone_user module

* Change example syntax on _nova_keypair module

* Change example syntax on _quantum_floating module

* Change example syntax on _quantum_floating_ip_associate module

* Change example syntax on _quantum_network module

* Change example syntax on _quantum_router module

* Change example syntax on _quantum_router_gateway module

* Change example syntax on _quantum_router_interface module

* Change example syntax on _quantum_subnet module

* SQUASH _quantum_subnet

* Add missing quotes
This commit is contained in:
Sam Doran
2016-11-15 16:00:33 -05:00
committed by Matt Clay
parent b56a9852ee
commit 38c0769abb
24 changed files with 385 additions and 167 deletions

View File

@@ -117,15 +117,16 @@ requirements: ["glanceclient", "keystoneclient"]
'''
EXAMPLES = '''
# Upload an image from an HTTP URL
- glance_image: login_username=admin
login_password=passme
login_tenant_name=admin
name=cirros
container_format=bare
disk_format=qcow2
state=present
copy_from=http:launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img
- name: Upload an image from an HTTP URL
glance_image:
login_username: admin
login_password: passme
login_tenant_name: admin
name: cirros
container_format: bare
disk_format: qcow2
state: present
copy_from: 'http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img'
'''
import time

View File

@@ -94,14 +94,22 @@ author: "Ansible Core Team (deprecated)"
'''
EXAMPLES = '''
# Create a tenant
- keystone_user: tenant=demo tenant_description="Default Tenant"
- name: Create a tenant
keystone_user:
tenant: demo
tenant_description: "Default Tenant"
# Create a user
- keystone_user: user=john tenant=demo password=secrete
- name: Create a user
keystone_user:
user: john
tenant: demo
password: secrete
# Apply the admin role to the john user in the demo tenant
- keystone_user: role=admin user=john tenant=demo
- name: Apply the admin role to the john user in the demo tenant
keystone_user:
role: admin
user: john
tenant: demo
'''
try:

View File

@@ -28,7 +28,7 @@ DOCUMENTATION = '''
---
module: nova_keypair
version_added: "1.2"
author:
author:
- "Benno Joy (@bennojoy)"
- "Michael DeHaan"
deprecated: Deprecated in 2.0. Use os_keypair instead
@@ -80,14 +80,22 @@ options:
requirements: ["novaclient"]
'''
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') }}
- name: Create 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
- name: Create 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
'''
def main():

View File

@@ -89,10 +89,15 @@ requirements: ["novaclient", "quantumclient", "neutronclient", "keystoneclient"]
'''
EXAMPLES = '''
# Assign a floating ip to the instance from an external network
- quantum_floating_ip: state=present login_username=admin login_password=admin
login_tenant_name=admin network_name=external_network
instance_name=vm1 internal_network_name=internal_network
- name: Assign a floating ip to the instance from an external network
quantum_floating_ip:
state: present
login_username: admin
login_password: admin
login_tenant_name: admin
network_name: external_network
instance_name: vm1
internal_network_name: internal_network
'''
def _get_ksclient(module, kwargs):

View File

@@ -81,14 +81,14 @@ requirements: ["quantumclient", "neutronclient", "keystoneclient"]
'''
EXAMPLES = '''
# Associate a specific floating IP with an Instance
- quantum_floating_ip_associate:
state=present
login_username=admin
login_password=admin
login_tenant_name=admin
ip_address=1.1.1.1
instance_name=vm1
- name: Associate a specific floating IP with an Instance
quantum_floating_ip_associate:
state: present
login_username: admin
login_password: admin
login_tenant_name: admin
ip_address: 1.1.1.1
instance_name: vm1
'''
def _get_ksclient(module, kwargs):

View File

@@ -109,15 +109,26 @@ requirements: ["quantumclient", "neutronclient", "keystoneclient"]
'''
EXAMPLES = '''
# Create a GRE backed Quantum network with tunnel id 1 for tenant1
- quantum_network: name=t1network tenant_name=tenant1 state=present
provider_network_type=gre provider_segmentation_id=1
login_username=admin login_password=admin login_tenant_name=admin
- name: Create a GRE backed Quantum network with tunnel id 1 for tenant1
quantum_network:
name: t1network
tenant_name: tenant1
state: present
provider_network_type: gre
provider_segmentation_id: 1
login_username: admin
login_password: admin
login_tenant_name: admin
# Create an external network
- quantum_network: name=external_network state=present
provider_network_type=local router_external=yes
login_username=admin login_password=admin login_tenant_name=admin
- name: Create an external network
quantum_network:
name: external_network
state: present
provider_network_type: local
router_external: yes
login_username: admin
login_password: admin
login_tenant_name: admin
'''
_os_keystone = None

View File

@@ -84,12 +84,13 @@ requirements: ["quantumclient", "neutronclient", "keystoneclient"]
'''
EXAMPLES = '''
# Creates a router for tenant admin
- quantum_router: state=present
login_username=admin
login_password=admin
login_tenant_name=admin
name=router1"
- name: Create a router for tenant admin
quantum_router:
state: present
login_username: admin
login_password: admin
login_tenant_name: admin
name: router1
'''
_os_keystone = None

View File

@@ -78,10 +78,14 @@ requirements: ["quantumclient", "neutronclient", "keystoneclient"]
'''
EXAMPLES = '''
# Attach an external network with a router to allow flow of external traffic
- quantum_router_gateway: state=present login_username=admin login_password=admin
login_tenant_name=admin router_name=external_router
network_name=external_network
- name: Attach an external network with a router to allow flow of external traffic
quantum_router_gateway:
state: present
login_username: admin
login_password: admin
login_tenant_name: admin
router_name: external_router
network_name: external_network
'''
_os_keystone = None

View File

@@ -83,13 +83,15 @@ requirements: ["quantumclient", "keystoneclient"]
'''
EXAMPLES = '''
# Attach tenant1's subnet to the external router
- quantum_router_interface: state=present login_username=admin
login_password=admin
login_tenant_name=admin
tenant_name=tenant1
router_name=external_route
subnet_name=t1subnet
- name: "Attach tenant1's subnet to the external router"
quantum_router_interface:
state: present
login_username: admin
login_password: admin
login_tenant_name: admin
tenant_name: tenant1
router_name: external_route
subnet_name: t1subnet
'''

View File

@@ -119,10 +119,16 @@ requirements: ["quantumclient", "neutronclient", "keystoneclient"]
'''
EXAMPLES = '''
# Create a subnet for a tenant with the specified subnet
- quantum_subnet: state=present login_username=admin login_password=admin
login_tenant_name=admin tenant_name=tenant1
network_name=network1 name=net1subnet cidr=192.168.0.0/24"
- name: Create a subnet for a tenant with the specified subnet
quantum_subnet:
state: present
login_username: admin
login_password: admin
login_tenant_name: admin
tenant_name: tenant1
network_name: network1
name: net1subnet
cidr: 192.168.0.0/24
'''
_os_keystone = None