Resolving differences in core modules post-merge

This commit is contained in:
James Cammarata
2016-12-07 21:33:38 -05:00
committed by Matt Clay
parent 95d59b61eb
commit 8afa090417
115 changed files with 2651 additions and 17913 deletions

View File

@@ -39,35 +39,28 @@ options:
description:
- name of the cloudformation stack
required: true
default: null
aliases: []
disable_rollback:
description:
- If a stacks fails to form, rollback will remove the stack
required: false
default: "false"
choices: [ "true", "false" ]
aliases: []
template_parameters:
description:
- a list of hashes of all the template variables for the stack
required: false
default: {}
aliases: []
state:
description:
- If state is "present", stack will be created. If state is "present" and if stack exists and template has changed, it will be updated.
If state is "absent", stack will be removed.
required: true
default: null
aliases: []
template:
description:
- The local path of the cloudformation template. This parameter is mutually exclusive with 'template_url'. Either one of them is required if "state" parameter is "present"
Must give full path to the file, relative to the working directory. If using roles this may look like "roles/cloudformation/files/cloudformation-example.json"
required: false
default: null
aliases: []
notification_arns:
description:
- The Simple Notification Service (SNS) topic ARNs to publish stack related events.
@@ -79,14 +72,12 @@ options:
- the path of the cloudformation stack policy. A policy cannot be removed once placed, but it can be modified. (for instance, [allow all updates](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html#d0e9051)
required: false
default: null
aliases: []
version_added: "1.9"
tags:
description:
- Dictionary of tags to associate with stack and its resources during stack creation. Can be updated later, updating tags removes previous entries.
required: false
default: null
aliases: []
version_added: "1.4"
template_url:
description:

View File

@@ -56,7 +56,7 @@ options:
region:
version_added: "1.2"
description:
- The AWS region to use. Must be specified if ec2_url is not used. If not specified then the value of the EC2_REGION environment variable, if any, is used.
- The AWS region to use. Must be specified if ec2_url is not used. If not specified then the value of the EC2_REGION environment variable, if any, is used. See U(http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region)
required: false
default: null
aliases: [ 'aws_region', 'ec2_region' ]
@@ -69,16 +69,17 @@ options:
aliases: [ 'aws_zone', 'ec2_zone' ]
instance_type:
description:
- instance type to use for the instance
- instance type to use for the instance, see U(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
required: true
default: null
aliases: []
tenancy:
version_added: "1.9"
description:
- An instance with a tenancy of "dedicated" runs on single-tenant hardware and can only be launched into a VPC. Valid values are "default" or "dedicated". Note that to use dedicated tenancy you MUST specify a vpc_subnet_id as well. Dedicated tenancy is not available for EC2 "micro" instances.
- An instance with a tenancy of "dedicated" runs on single-tenant hardware and can only be launched into a VPC. Note that to use dedicated tenancy you MUST specify a vpc_subnet_id as well. Dedicated tenancy is not available for EC2 "micro" instances.
required: false
default: default
choices: [ "default", "dedicated" ]
aliases: []
spot_price:
version_added: "1.5"
@@ -143,6 +144,7 @@ options:
- enable detailed monitoring (CloudWatch) for instance
required: false
default: null
choices: [ "yes", "no" ]
aliases: []
user_data:
version_added: "0.9"
@@ -178,6 +180,7 @@ options:
- when provisioning within vpc, assign a public IP address. Boto library must be 2.13.0+
required: false
default: null
choices: [ "yes", "no" ]
aliases: []
private_ip:
version_added: "1.2"

View File

@@ -51,12 +51,6 @@ options:
- create or deregister/delete image
required: false
default: 'present'
region:
description:
- The AWS region to use. Must be specified if ec2_url is not used. If not specified then the value of the EC2_REGION environment variable, if any, is used.
required: false
default: null
aliases: [ 'aws_region', 'ec2_region' ]
description:
description:
- An optional human-readable string describing the contents and purpose of the AMI.
@@ -74,10 +68,10 @@ options:
required: false
default: null
device_mapping:
version_added: "1.9"
version_added: "2.0"
description:
- An optional list of device hashes/dictionaries with custom configurations (same block-device-mapping parameters)
- Valid properties include: device_name, volume_type, size (in GB), delete_on_termination (boolean), no_device (boolean), snapshot_id, iops (for io1 volume_type)
- "Valid properties include: device_name, volume_type, size (in GB), delete_on_termination (boolean), no_device (boolean), snapshot_id, iops (for io1 volume_type)"
required: false
default: null
delete_snapshot:
@@ -305,6 +299,7 @@ import time
try:
import boto
import boto.ec2
from boto.ec2.blockdevicemapping import BlockDeviceType, BlockDeviceMapping
HAS_BOTO = True
except ImportError:
HAS_BOTO = False
@@ -365,6 +360,7 @@ def create_image(module, ec2):
wait_timeout = int(module.params.get('wait_timeout'))
description = module.params.get('description')
no_reboot = module.params.get('no_reboot')
device_mapping = module.params.get('device_mapping')
tags = module.params.get('tags')
launch_permissions = module.params.get('launch_permissions')

View File

@@ -22,7 +22,7 @@ ANSIBLE_METADATA = {'status': ['preview'],
DOCUMENTATION = '''
---
module: ec2_ami_find
version_added: 2.0
version_added: '2.0'
short_description: Searches for AMIs to obtain the AMI ID and other information
description:
- Returns list of matching AMIs with AMI ID, along with other useful information

View File

@@ -69,7 +69,7 @@ options:
required: false
replace_all_instances:
description:
- In a rolling fashion, replace all instances with an old launch configuration with one from the current launch configuraiton.
- In a rolling fashion, replace all instances with an old launch configuration with one from the current launch configuration.
required: false
version_added: "1.8"
default: False
@@ -91,11 +91,6 @@ options:
required: false
version_added: "1.8"
default: True
region:
description:
- The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used.
required: false
aliases: ['aws_region', 'ec2_region']
vpc_zone_identifier:
description:
- List of VPC subnets to use
@@ -142,7 +137,7 @@ options:
- An ordered list of criteria used for selecting instances to be removed from the Auto Scaling group when reducing capacity.
- For 'Default', when used to create a new autoscaling group, the "Default"i value is used. When used to change an existent autoscaling group, the current termination policies are maintained.
required: false
default: Default. Eg, when used to create a new autoscaling group, the “Default” value is used. When used to change an existent autoscaling group, the current termination policies are mantained
default: Default
choices: ['OldestInstance', 'NewestInstance', 'OldestLaunchConfiguration', 'ClosestToNextInstanceHour', 'Default']
version_added: "2.0"
notification_topic:

View File

@@ -47,12 +47,6 @@ options:
required: false
choices: ['present', 'absent']
default: present
region:
description:
- the EC2 region to use
required: false
default: null
aliases: [ ec2_region ]
in_vpc:
description:
- allocate an EIP inside a VPC or not

View File

@@ -45,11 +45,6 @@ options:
- List of ELB names, required for registration. The ec2_elbs fact should be used if there was a previous de-register.
required: false
default: None
region:
description:
- The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used.
required: false
aliases: ['aws_region', 'ec2_region']
enable_availability_zone:
description:
- Whether to enable the availability zone of the instance on the target ELB if the availability zone has not already
@@ -77,7 +72,9 @@ options:
required: false
default: 0
version_added: "1.6"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
"""
EXAMPLES = """

View File

@@ -82,7 +82,7 @@ options:
version_added: "2.0"
health_check:
description:
- An associative array of health check configuration settigs (see example)
- An associative array of health check configuration settings (see example)
require: false
default: None
access_logs:
@@ -131,7 +131,7 @@ options:
version_added: "2.0"
cross_az_load_balancing:
description:
- Distribute load across all configured Availablity Zones
- Distribute load across all configured Availability Zones
required: false
default: "no"
choices: ["yes", "no"]
@@ -163,7 +163,9 @@ options:
required: false
version_added: "2.1"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
"""
EXAMPLES = """
@@ -271,7 +273,7 @@ EXAMPLES = """
purge_listeners: no
# Normally, this module will leave availability zones that are enabled
# on the ELB alone. If purge_zones is true, then any extreneous zones
# on the ELB alone. If purge_zones is true, then any extraneous zones
# will be removed
- local_action:
module: ec2_elb_lb
@@ -762,7 +764,7 @@ class ElbManager(object):
# Does it match exactly?
if listener_as_tuple != existing_listener_found:
# The ports are the same but something else is different,
# so we'll remove the exsiting one and add the new one
# so we'll remove the existing one and add the new one
listeners_to_remove.append(existing_listener_found)
listeners_to_add.append(listener_as_tuple)
else:

View File

@@ -33,7 +33,7 @@ options:
required: false
default: 'yes'
choices: ['yes', 'no']
version_added: 1.5.1
version_added: '1.5.1'
description:
- This module fetches data from the metadata servers in ec2 (aws) as per
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html.

View File

@@ -49,12 +49,6 @@ options:
- List of firewall outbound rules to enforce in this group (see example). If none are supplied, a default all-out rule is assumed. If an empty list is supplied, no outbound rules will be enabled.
required: false
version_added: "1.6"
region:
description:
- the EC2 region to use
required: false
default: null
aliases: []
state:
version_added: "1.4"
description:
@@ -78,7 +72,9 @@ options:
default: 'true'
aliases: []
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
notes:
- If a rule declares a group_name and that group doesn't exist, it will be

View File

@@ -35,12 +35,6 @@ options:
description:
- Public key material.
required: false
region:
description:
- the EC2 region to use
required: false
default: null
aliases: []
state:
description:
- create or delete keypair
@@ -62,7 +56,9 @@ options:
aliases: []
version_added: "1.6"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
author: "Vincent Viallet (@zbal)"
'''

View File

@@ -59,11 +59,6 @@ options:
description:
- A list of security groups to apply to the instances. For VPC instances, specify security group IDs. For EC2-Classic, specify either security group names or IDs.
required: false
region:
description:
- The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used.
required: false
aliases: ['aws_region', 'ec2_region']
volumes:
description:
- a list of volume dicts, each containing device name and optionally ephemeral id or snapshot id. Size and type (and number of iops for io device type) must be specified for a new volume or a root volume, and may be passed for a snapshot volume. For any volume, a volume size less than 1 will be interpreted as a request not to create the volume.
@@ -110,7 +105,7 @@ options:
- Id of ClassicLink enabled VPC
required: false
version_added: "2.0"
classic_link_vpc_security_groups"
classic_link_vpc_security_groups:
description:
- A list of security group id's with which to associate the ClassicLink VPC instances.
required: false

View File

@@ -33,7 +33,7 @@ options:
required: true
choices: ['present', 'absent']
name:
desciption:
description:
- Unique name for the alarm
required: true
metric:
@@ -75,7 +75,7 @@ options:
options: ['Seconds','Microseconds','Milliseconds','Bytes','Kilobytes','Megabytes','Gigabytes','Terabytes','Bits','Kilobits','Megabits','Gigabits','Terabits','Percent','Count','Bytes/Second','Kilobytes/Second','Megabytes/Second','Gigabytes/Second','Terabytes/Second','Bits/Second','Kilobits/Second','Megabits/Second','Gigabits/Second','Terabits/Second','Count/Second','None']
description:
description:
- A longer desciption of the alarm
- A longer description of the alarm
required: false
dimensions:
description:
@@ -93,7 +93,9 @@ options:
description:
- A list of the names of action(s) to take when the alarm is in the 'ok' status
required: false
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
"""
EXAMPLES = '''

View File

@@ -41,7 +41,7 @@ options:
- Name of the associated autoscaling group
required: true
adjustment_type:
desciption:
description:
- The type of change in capacity of the autoscaling group
required: false
choices: ['ChangeInCapacity','ExactCapacity','PercentChangeInCapacity']
@@ -57,7 +57,9 @@ options:
description:
- The minimum period of time between which autoscaling actions can take place
required: false
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
"""
EXAMPLES = '''

View File

@@ -26,11 +26,6 @@ description:
- creates an EC2 snapshot from an existing EBS volume
version_added: "1.5"
options:
region:
description:
- The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used.
required: false
aliases: ['aws_region', 'ec2_region']
volume_id:
description:
- volume from which to take the snapshot
@@ -86,7 +81,9 @@ options:
version_added: "2.0"
author: "Will Thames (@willthames)"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -26,12 +26,6 @@ description:
- Creates, removes and lists tags from any EC2 resource. The resource is referenced by its resource id (e.g. an instance being i-XXXXXXX). It is designed to be used with complex args (tags), see the examples. This module has a dependency on python-boto.
version_added: "1.3"
options:
region:
description:
- region in which the resource exists.
required: false
default: null
aliases: ['aws_region', 'ec2_region']
resource:
description:
- The EC2 resource id.
@@ -53,7 +47,9 @@ options:
aliases: []
author: "Lester Wade (@lwade)"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -105,7 +105,9 @@ options:
choices: ['absent', 'present', 'list']
version_added: "1.6"
author: "Lester Wade (@lwade)"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -91,7 +91,9 @@ options:
required: true
choices: [ "present", "absent" ]
author: "Carson Gee (@carsongee)"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''
@@ -476,6 +478,7 @@ def create_vpc(module, vpc_conn):
# Handle Internet gateway (create/delete igw)
igw = None
igw_id = None
igws = vpc_conn.get_all_internet_gateways(filters={'attachment.vpc-id': vpc.id})
if len(igws) > 1:
module.fail_json(msg='EC2 returned more than one Internet Gateway for id %s, aborting' % vpc.id)
@@ -499,6 +502,9 @@ def create_vpc(module, vpc_conn):
except EC2ResponseError as e:
module.fail_json(msg='Unable to delete Internet Gateway, error: {0}'.format(e))
if igw is not None:
igw_id = igw.id
# Handle route tables - this may be worth splitting into a
# different module but should work fine here. The strategy to stay
# idempotent is to basically build all the route tables as
@@ -602,6 +608,7 @@ def create_vpc(module, vpc_conn):
module.fail_json(msg='Unable to delete old route table {0}, error: {1}'.format(rt.id, e))
vpc_dict = get_vpc_info(vpc)
created_vpc_id = vpc.id
returned_subnets = []
current_subnets = vpc_conn.get_all_subnets(filters={ 'vpc_id': vpc.id })
@@ -624,7 +631,7 @@ def create_vpc(module, vpc_conn):
subnets_in_play = len(subnets)
returned_subnets.sort(key=lambda x: order.get(x['cidr'], subnets_in_play))
return (vpc_dict, created_vpc_id, returned_subnets, changed)
return (vpc_dict, created_vpc_id, returned_subnets, igw_id, changed)
def terminate_vpc(module, vpc_conn, vpc_id=None, cidr=None):
"""
@@ -723,6 +730,7 @@ def main():
else:
module.fail_json(msg="region must be specified")
igw_id = None
if module.params.get('state') == 'absent':
vpc_id = module.params.get('vpc_id')
cidr = module.params.get('cidr_block')
@@ -730,9 +738,9 @@ def main():
subnets_changed = None
elif module.params.get('state') == 'present':
# Changed is always set to true when provisioning a new VPC
(vpc_dict, new_vpc_id, subnets_changed, changed) = create_vpc(module, vpc_conn)
(vpc_dict, new_vpc_id, subnets_changed, igw_id, changed) = create_vpc(module, vpc_conn)
module.exit_json(changed=changed, vpc_id=new_vpc_id, vpc=vpc_dict, subnets=subnets_changed)
module.exit_json(changed=changed, vpc_id=new_vpc_id, vpc=vpc_dict, igw_id=igw_id, subnets=subnets_changed)
# import module snippets
from ansible.module_utils.basic import *

View File

@@ -76,7 +76,9 @@ options:
default: false
required: false
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -74,7 +74,7 @@ options:
- The subnet group name to associate with. Only use if inside a vpc. Required if inside a vpc
required: false
default: None
version_added: "1.7"
version_added: "2.0"
security_group_ids:
description:
- A list of vpc security group names to associate with this cache cluster. Only use if inside a vpc
@@ -103,13 +103,9 @@ options:
required: false
default: no
choices: [ "yes", "no" ]
region:
description:
- The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used.
required: true
default: null
aliases: ['aws_region', 'ec2_region']
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
"""
EXAMPLES = """

View File

@@ -31,34 +31,25 @@ options:
- Specifies whether the subnet should be present or absent.
required: true
default: present
aliases: []
choices: [ 'present' , 'absent' ]
name:
description:
- Database subnet group identifier.
required: true
default: null
aliases: []
description:
description:
- Elasticache subnet group description. Only set when a new group is added.
required: false
default: null
aliases: []
subnets:
description:
- List of subnet IDs that make up the Elasticache subnet group.
required: false
default: null
aliases: []
region:
description:
- The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used.
required: true
default: null
aliases: ['aws_region', 'ec2_region']
author: Tim Mahoney
extends_documentation_fragment: aws
author: "Tim Mahoney (@timmahoney)"
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -36,24 +36,22 @@ options:
description:
- Name of IAM resource to create or identify
required: true
aliases: []
new_name:
description:
- When state is update, will replace name with new_name on IAM resource
required: false
aliases: []
default: null
new_path:
description:
- When state is update, will replace the path with new_path on the IAM resource
required: false
aliases: []
default: null
state:
description:
- Whether to create, delete or update the IAM resource. Note, roles cannot be updated.
required: true
default: null
choices: [ "present", "absent", "update" ]
aliases: []
path:
description:
- When creating or updating, specify the desired path of the resource. If state is present, it will replace the current path to match what is passed in when they do not match.
@@ -77,13 +75,11 @@ options:
required: false
default: null
choices: [ "create", "remove", "active", "inactive"]
aliases: []
key_count:
description:
- When access_key_state is create it will ensure this quantity of keys are present. Defaults to 1.
required: false
default: '1'
aliases: []
access_key_ids:
description:
- A list of the keys that you want impacted by the access_key_state parameter.
@@ -92,13 +88,11 @@ options:
- A list of groups the user should belong to. When update, will gracefully remove groups not listed.
required: false
default: null
aliases: []
password:
description:
- When type is user and state is present, define the users login password. Also works with update. Note that always returns changed.
required: false
default: null
aliases: []
update_password:
required: false
default: always

View File

@@ -89,7 +89,9 @@ options:
requirements: [ "boto" ]
author: Jonathan I. Davila
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -62,7 +62,9 @@ options:
notes:
- 'Currently boto does not support the removal of Managed Policies, the module will not work removing/adding managed policies.'
author: "Jonathan I. Davila (@defionscode)"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -65,7 +65,9 @@ options:
default: null
aliases: []
author: "Scott Anderson (@tastychutney)"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -51,14 +51,10 @@ options:
required: false
default: null
aliases: []
region:
description:
- The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used.
required: true
default: null
aliases: ['aws_region', 'ec2_region']
author: "Scott Anderson (@tastychutney)"
extends_documentation_fragment: aws
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''

View File

@@ -30,33 +30,26 @@ options:
description:
- Specifies the action to take.
required: true
default: null
aliases: []
choices: [ 'get', 'create', 'delete' ]
zone:
description:
- The DNS zone to modify
required: true
default: null
aliases: []
hosted_zone_id:
description:
- The Hosted Zone ID of the DNS zone to modify
required: false
version_added: 2.0
version_added: "2.0"
default: null
record:
description:
- The full DNS record to create or delete
required: true
default: null
aliases: []
ttl:
description:
- The TTL to give the new record
required: false
default: 3600 (one hour)
aliases: []
type:
description:
- The type of DNS record to create
@@ -66,40 +59,36 @@ options:
description:
- Indicates if this is an alias record.
required: false
version_added: 1.9
version_added: "1.9"
default: False
aliases: []
choices: [ 'True', 'False' ]
alias_hosted_zone_id:
description:
- The hosted zone identifier.
required: false
version_added: 1.9
version_added: "1.9"
default: null
alias_evaluate_target_health:
description:
- Whether or not to evaluate an alias target health. Useful for aliases to Elastic Load Balancers.
required: false
version_added: "2.0"
version_added: "2.1"
default: false
value:
description:
- The new value when creating a DNS record. Multiple comma-spaced values are allowed for non-alias records. When deleting a record all values for the record must be specified or Route53 will not delete it.
required: false
default: null
aliases: []
overwrite:
description:
- Whether an existing record should be overwritten on create if values do not match
required: false
default: null
aliases: []
retry_interval:
description:
- In the case that route53 is still servicing a prior request, this module will wait and try again after this many seconds. If you have many domain names, the default of 500 seconds may be too long.
required: false
default: 500
aliases: []
private_zone:
description:
- If set to true, the private zone matching the requested name within the domain will be used if there are both public and private zones. The default is to use the public zone.
@@ -316,6 +305,7 @@ import distutils.version
try:
import boto
import boto.ec2
from boto import route53
from boto.route53 import Route53Connection
from boto.route53.record import Record, ResourceRecordSets
@@ -496,26 +486,11 @@ def main():
except boto.exception.BotoServerError as e:
module.fail_json(msg = e.error_message)
# Get all the existing hosted zones and save their ID's
zones = {}
results = conn.get_all_hosted_zones()
for r53zone in results['ListHostedZonesResponse']['HostedZones']:
# only save this zone id if the private status of the zone matches
# the private_zone_in boolean specified in the params
if module.boolean(r53zone['Config'].get('PrivateZone', False)) == private_zone_in:
zone_id = r53zone['Id'].replace('/hostedzone/', '')
# only save when unique hosted_zone_id is given and is equal
# hosted_zone_id_in is specified in the params
if hosted_zone_id_in and zone_id == hosted_zone_id_in:
zones[r53zone['Name']] = zone_id
elif not hosted_zone_id_in:
zones[r53zone['Name']] = zone_id
# Find the named zone ID
zone = get_zone_by_name(conn, module, zone_in, private_zone_in, hosted_zone_id_in, vpc_id_in)
# Verify that the requested zone is already defined in Route53
if not zone_in in zones and hosted_zone_id_in:
errmsg = "Hosted_zone_id %s does not exist in Route53" % hosted_zone_id_in
module.fail_json(msg = errmsg)
if not zone_in in zones:
if zone is None:
errmsg = "Zone %s does not exist in Route53" % zone_in
module.fail_json(msg = errmsg)
@@ -551,6 +526,8 @@ def main():
record['ttl'] = rset.ttl
record['value'] = ','.join(sorted(rset.resource_records))
record['values'] = sorted(rset.resource_records)
if hosted_zone_id_in:
record['hosted_zone_id'] = hosted_zone_id_in
record['identifier'] = rset.identifier
record['weight'] = rset.weight
record['region'] = rset.region

View File

@@ -584,7 +584,7 @@ def main():
if overwrite == 'always':
download_s3file(module, s3, bucket, obj, dest, retries, version=version)
else:
module.exit_json(msg="Local and remote object are identical, ignoring. Use overwrite parameter to force.", changed=False)
module.exit_json(msg="Local and remote object are identical, ignoring. Use overwrite=always parameter to force.", changed=False)
else:
sum_matches = False
@@ -594,7 +594,7 @@ def main():
module.exit_json(msg="WARNING: Checksums do not match. Use overwrite parameter to force download.")
# Firstly, if key_matches is TRUE and overwrite is not enabled, we EXIT with a helpful message.
if sum_matches is True and overwrite is False:
if sum_matches is True and overwrite == 'never':
module.exit_json(msg="Local and remote object are identical, ignoring. Use overwrite parameter to force.", changed=False)
# if our mode is a PUT operation (upload), go through the procedure as appropriate ...

View File

@@ -38,12 +38,12 @@ options:
default: null
subscription_id:
description:
- azure subscription id. Overrides the AZURE_SUBSCRIPTION_ID environement variable.
- azure subscription id. Overrides the AZURE_SUBSCRIPTION_ID environment variable.
required: false
default: null
management_cert_path:
description:
- path to an azure management certificate associated with the subscription id. Overrides the AZURE_CERT_PATH environement variable.
- path to an azure management certificate associated with the subscription id. Overrides the AZURE_CERT_PATH environment variable.
required: false
default: null
storage_account:
@@ -114,13 +114,6 @@ options:
required: false
default: 'present'
aliases: []
reset_pass_atlogon:
description:
- Reset the admin password on first logon for windows hosts
required: false
default: "no"
version_added: "2.0"
choices: [ "yes", "no" ]
auto_updates:
description:
- Enable Auto Updates on Windows Machines
@@ -258,7 +251,7 @@ AZURE_ROLE_SIZES = ['ExtraSmall',
'Standard_DS14',
'Standard_G1',
'Standard_G2',
'Sandard_G3',
'Standard_G3',
'Standard_G4',
'Standard_G5']
@@ -516,7 +509,7 @@ def terminate_virtual_machine(module, azure):
def get_azure_creds(module):
# Check modul args for credentials, then check environment vars
# Check module args for credentials, then check environment vars
subscription_id = module.params.get('subscription_id')
if not subscription_id:
subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', None)
@@ -553,7 +546,6 @@ def main():
wait=dict(type='bool', default=False),
wait_timeout=dict(default=600),
wait_timeout_redirects=dict(default=300),
reset_pass_atlogon=dict(type='bool', default=False),
auto_updates=dict(type='bool', default=False),
enable_winrm=dict(type='bool', default=True),
)

View File

@@ -264,17 +264,17 @@ class AzureRMPublicIPAddress(AzureRMModuleBase):
def create_or_update_pip(self, pip):
try:
poller = self.network_client.public_ip_addresses.create_or_update(self.resource_group, self.name, pip)
pip = self.get_poller_result(poller)
except Exception as exc:
self.fail("Error creating or updating {0} - {1}".format(self.name, str(exc)))
pip = self.get_poller_result(poller)
return pip_to_dict(pip)
def delete_pip(self):
try:
poller = self.network_client.public_ip_addresses.delete(self.resource_group, self.name)
self.get_poller_result(poller)
except Exception as exc:
self.fail("Error deleting {0} - {1}".format(self.name, str(exc)))
self.get_poller_result(poller)
# Delete returns nada. If we get here, assume that all is well.
self.results['state']['status'] = 'Deleted'
return True

View File

@@ -74,11 +74,10 @@ options:
version_added: "1.5"
ports:
description:
- List containing private to public port mapping specification. Use docker
- 'CLI-style syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000)'
- where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is
- a host interface. The container ports need to be exposed either in the
- Dockerfile or via the next option.
- "List containing private to public port mapping specification.
Use docker 'CLI-style syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000)'
where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is - a host interface.
The container ports need to be exposed either in the Dockerfile or via the C(expose) option."
default: null
version_added: "1.5"
expose:
@@ -154,10 +153,7 @@ options:
description:
- RAM allocated to the container as a number of bytes or as a human-readable
string like "512MB". Leave as "0" to specify no limit.
required: false
default: null
aliases: []
default: 256MB
default: 0
docker_url:
description:
- URL of the host running the docker daemon. This will default to the env
@@ -878,7 +874,7 @@ class DockerManager(object):
we lack the capability.
"""
if not self._capabilities:
self._check_capabilties()
self._check_capabilities()
if capability in self._capabilities:
return True
@@ -1054,7 +1050,7 @@ class DockerManager(object):
elif p_len == 3:
# Bind `container_port` of the container to port `parts[1]` on
# IP `parts[0]` of the host machine. If `parts[1]` empty bind
# to a dynamically allocacted port of IP `parts[0]`.
# to a dynamically allocated port of IP `parts[0]`.
bind = (parts[0], int(parts[1])) if parts[1] else (parts[0],)
if container_port in binds:
@@ -1643,23 +1639,10 @@ class DockerManager(object):
'name': self.module.params.get('name'),
'stdin_open': self.module.params.get('stdin_open'),
'tty': self.module.params.get('tty'),
'volumes_from': self.module.params.get('volumes_from'),
'dns': self.module.params.get('dns'),
'cpuset': self.module.params.get('cpu_set'),
'cpu_shares': self.module.params.get('cpu_shares'),
'user': self.module.params.get('docker_user'),
}
if docker.utils.compare_version('1.10', self.client.version()['ApiVersion']) >= 0:
params['volumes_from'] = ""
if params['volumes_from'] is not None:
self.ensure_capability('volumes_from')
extra_params = {}
if self.module.params.get('insecure_registry'):
if self.ensure_capability('insecure_registry', fail=False):
extra_params['insecure_registry'] = self.module.params.get('insecure_registry')
if self.ensure_capability('host_config', fail=False):
params['host_config'] = self.create_host_config()

View File

@@ -31,25 +31,20 @@ options:
description:
- Bucket name.
required: true
default: null
aliases: []
object:
description:
- Keyname of the object inside the bucket. Can be also be used to create "virtual directories" (see examples).
required: false
default: null
aliases: []
src:
description:
- The source file path when performing a PUT operation.
required: false
default: null
aliases: []
dest:
description:
- The destination file path when downloading an object/key with a GET operation.
required: false
aliases: []
force:
description:
- Forces an overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations.
@@ -62,23 +57,21 @@ options:
required: false
default: private
headers:
version_added: 2.0
version_added: "2.0"
description:
- Headers to attach to object.
required: false
default: {}
default: '{}'
expiration:
description:
- Time limit (in seconds) for the URL generated and returned by GCA when performing a mode=put or mode=get_url operation. This url is only avaialbe when public-read is the acl for the object.
- Time limit (in seconds) for the URL generated and returned by GCA when performing a mode=put or mode=get_url operation. This url is only available when public-read is the acl for the object.
required: false
default: null
aliases: []
mode:
description:
- Switches the module behaviour between upload, download, get_url (return download url) , get_str (download object as string), create (bucket) and delete (bucket).
required: true
default: null
aliases: []
choices: [ 'get', 'put', 'get_url', 'get_str', 'delete', 'create' ]
gs_secret_key:
description:

View File

@@ -36,35 +36,30 @@ options:
- image string to use for the instance
required: false
default: "debian-7"
aliases: []
instance_names:
description:
- a comma-separated list of instance names to create or destroy
required: false
default: null
aliases: []
machine_type:
description:
- machine type to use for the instance, use 'n1-standard-1' by default
required: false
default: "n1-standard-1"
aliases: []
metadata:
description:
- a hash/dictionary of custom data for the instance;
'{"key":"value", ...}'
required: false
default: null
aliases: []
service_account_email:
version_added: 1.5.1
version_added: "1.5.1"
description:
- service account email
required: false
default: null
aliases: []
service_account_permissions:
version_added: 2.0
version_added: "2.0"
description:
- service account permissions (see
U(https://cloud.google.com/sdk/gcloud/reference/compute/instances/create),
@@ -78,7 +73,7 @@ options:
"storage-rw", "taskqueue", "userinfo-email"
]
pem_file:
version_added: 1.5.1
version_added: "1.5.1"
description:
- path to the pem file associated with the service account email
This option is deprecated. Use 'credentials_file'.
@@ -91,12 +86,11 @@ options:
default: null
required: false
project_id:
version_added: 1.5.1
version_added: "1.5.1"
description:
- your GCE project ID
required: false
default: null
aliases: []
name:
description:
- either a name of a single instance or when used with 'num_instances',
@@ -126,7 +120,6 @@ options:
- if set, create the instance with a persistent boot disk
required: false
default: "false"
aliases: []
disks:
description:
- a list of persistent disks to attach to the instance; a string value
@@ -135,7 +128,6 @@ options:
will be the boot disk (which must be READ_WRITE).
required: false
default: null
aliases: []
version_added: "1.7"
state:
description:
@@ -148,13 +140,11 @@ options:
- a comma-separated list of tags to associate with the instance
required: false
default: null
aliases: []
zone:
description:
- the GCE zone to use
required: true
default: "us-central1-a"
aliases: []
ip_forward:
version_added: "1.9"
description:
@@ -162,14 +152,12 @@ options:
gateways)
required: false
default: "false"
aliases: []
external_ip:
version_added: "1.9"
description:
- type of external ip, ephemeral by default; alternatively, a list of fixed gce ips or ip names can be given (if there is not enough specified ip, 'ephemeral' will be used). Specify 'none' if no external ip is desired.
required: false
default: "ephemeral"
aliases: []
disk_auto_delete:
version_added: "1.9"
description:

View File

@@ -26,7 +26,7 @@ module: gce_net
version_added: "1.5"
short_description: create/destroy GCE networks and firewall rules
description:
- This module can create and destroy Google Compue Engine networks and
- This module can create and destroy Google Compute Engine networks and
firewall rules U(https://developers.google.com/compute/docs/networking).
The I(name) parameter is reserved for referencing a network while the
I(fwname) parameter is used to reference firewall rules.

View File

@@ -116,7 +116,10 @@ options:
required: false
default: publicURL
version_added: "1.7"
requirements: ["glanceclient", "keystoneclient"]
requirements:
- "python >= 2.6"
- "python-glanceclient"
- "python-keystoneclient"
'''
@@ -136,9 +139,14 @@ EXAMPLES = '''
import time
try:
import glanceclient
from keystoneclient.v2_0 import client as ksclient
HAS_GLANCECLIENT = True
except ImportError:
print("failed=True msg='glanceclient and keystone client are required'")
HAS_GLANCECLIENT = False
try:
from keystoneclient.v2_0 import client as ksclient
HAS_KEYSTONECLIENT = True
except ImportError:
HAS_KEYSTONECLIENT= False
def _get_ksclient(module, kwargs):
@@ -269,4 +277,5 @@ def main():
# this is magic, see lib/ansible/module_common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -19,15 +19,16 @@
import operator
import os
import time
try:
from novaclient.v1_1 import client as nova_client
from novaclient.v1_1 import floating_ips
from novaclient import exceptions
from novaclient import utils
import time
HAS_NOVACLIENT = True
except ImportError:
print("failed=True msg='novaclient is required for this module'")
HAS_NOVACLIENT = False
ANSIBLE_METADATA = {'status': ['deprecated'],
'supported_by': 'community',
@@ -37,7 +38,7 @@ DOCUMENTATION = '''
---
module: nova_compute
version_added: "1.2"
deprecated: Deprecated in 1.10. Use os_server instead
deprecated: Deprecated in 2.0. Use os_server instead
short_description: Create/Delete VMs from OpenStack
description:
- Create or Remove virtual machines from Openstack.
@@ -179,7 +180,9 @@ options:
required: false
default: None
version_added: "1.9"
requirements: ["novaclient"]
requirements:
- "python >= 2.6"
- "python-novaclient"
'''
EXAMPLES = '''
@@ -567,6 +570,9 @@ def main():
],
)
if not HAS_NOVACLIENT:
module.fail_json(msg='python-novaclient is required for this module')
nova = nova_client.Client(module.params['login_username'],
module.params['login_password'],
module.params['login_tenant_name'],
@@ -593,4 +599,5 @@ def main():
# this is magic, see lib/ansible/module_common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -17,12 +17,13 @@
# You should have received a copy of the GNU General Public License
# along with this software. If not, see <http://www.gnu.org/licenses/>.
import time
try:
from novaclient.v1_1 import client as nova_client
from novaclient import exceptions as exc
import time
HAS_NOVACLIENT = True
except ImportError:
print("failed=True msg='novaclient is required for this module to work'")
HAS_NOVACLIENT = False
ANSIBLE_METADATA = {'status': ['deprecated'],
'supported_by': 'community',
@@ -81,7 +82,9 @@ options:
required: false
default: None
requirements: ["novaclient"]
requirements:
- "python >= 2.6"
- "python-novaclient"
'''
EXAMPLES = '''
- name: Create a key pair with the running users public key
@@ -110,6 +113,8 @@ def main():
state = dict(default='present', choices=['absent', 'present'])
))
module = AnsibleModule(argument_spec=argument_spec)
if not HAS_NOVACLIENT:
module.fail_json(msg='python-novaclient is required for this module to work')
nova = nova_client.Client(module.params['login_username'],
module.params['login_password'],
@@ -151,5 +156,6 @@ def main():
# this is magic, see lib/ansible/module.params['common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this software. If not, see <http://www.gnu.org/licenses/>.
import time
try:
from novaclient.v1_1 import client as nova_client
try:
@@ -23,9 +25,9 @@ try:
except ImportError:
from quantumclient.quantum import client
from keystoneclient.v2_0 import client as ksclient
import time
HAVE_DEPS = True
except ImportError:
print("failed=True msg='novaclient,keystoneclient and quantumclient (or neutronclient) are required'")
HAVE_DEPS = False
ANSIBLE_METADATA = {'status': ['deprecated'],
'supported_by': 'community',
@@ -89,7 +91,11 @@ options:
required: false
default: None
version_added: "1.5"
requirements: ["novaclient", "quantumclient", "neutronclient", "keystoneclient"]
requirements:
- "python >= 2.6"
- "python-novaclient"
- "python-neutronclient or python-quantumclient"
- "python-keystoneclient"
'''
EXAMPLES = '''
@@ -252,6 +258,9 @@ def main():
))
module = AnsibleModule(argument_spec=argument_spec)
if not HAVE_DEPS:
module.fail_json(msg='python-novaclient, python-keystoneclient, and either python-neutronclient or python-quantumclient are required')
try:
nova = nova_client.Client(module.params['login_username'], module.params['login_password'],
module.params['login_tenant_name'], module.params['auth_url'], region_name=module.params['region_name'], service_type='compute')
@@ -285,5 +294,6 @@ def main():
# this is magic, see lib/ansible/module.params['common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this software. If not, see <http://www.gnu.org/licenses/>.
import time
try:
from novaclient.v1_1 import client as nova_client
try:
@@ -23,9 +24,9 @@ try:
except ImportError:
from quantumclient.quantum import client
from keystoneclient.v2_0 import client as ksclient
import time
HAVE_DEPS = True
except ImportError:
print "failed=True msg='novaclient, keystone, and quantumclient (or neutronclient) client are required'"
HAVE_DEPS = False
ANSIBLE_METADATA = {'status': ['deprecated'],
'supported_by': 'community',
@@ -81,7 +82,11 @@ options:
- floating ip that should be assigned to the instance
required: true
default: None
requirements: ["quantumclient", "neutronclient", "keystoneclient"]
requirements:
- "python >= 2.6"
- "python-novaclient"
- "python-neutronclient or python-quantumclient"
- "python-keystoneclient"
'''
EXAMPLES = '''
@@ -192,6 +197,9 @@ def main():
))
module = AnsibleModule(argument_spec=argument_spec)
if not HAVE_DEPS:
module.fail_json(msg='python-novaclient, python-keystoneclient, and either python-neutronclient or python-quantumclient are required')
try:
nova = nova_client.Client(module.params['login_username'], module.params['login_password'],
module.params['login_tenant_name'], module.params['auth_url'], service_type='compute')
@@ -220,5 +228,6 @@ def main():
# this is magic, see lib/ansible/module.params['common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -22,8 +22,9 @@ try:
except ImportError:
from quantumclient.quantum import client
from keystoneclient.v2_0 import client as ksclient
HAVE_DEPS = True
except ImportError:
print("failed=True msg='quantumclient (or neutronclient) and keystone client are required'")
HAVE_DEPS = False
ANSIBLE_METADATA = {'status': ['deprecated'],
'supported_by': 'community',
@@ -108,7 +109,10 @@ options:
- Whether the state should be marked as up or down
required: false
default: true
requirements: ["quantumclient", "neutronclient", "keystoneclient"]
requirements:
- "python >= 2.6"
- "python-neutronclient or python-quantumclient"
- "python-keystoneclient"
'''
@@ -259,6 +263,9 @@ def main():
))
module = AnsibleModule(argument_spec=argument_spec)
if not HAVE_DEPS:
module.fail_json(msg='python-keystoneclient and either python-neutronclient or python-quantumclient are required')
if module.params['provider_network_type'] in ['vlan' , 'flat']:
if not module.params['provider_physical_network']:
module.fail_json(msg = " for vlan and flat networks, variable provider_physical_network should be set.")
@@ -290,5 +297,6 @@ def main():
# this is magic, see lib/ansible/module.params['common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -22,8 +22,9 @@ try:
except ImportError:
from quantumclient.quantum import client
from keystoneclient.v2_0 import client as ksclient
HAVE_DEPS = True
except ImportError:
print("failed=True msg='quantumclient (or neutronclient) and keystone client are required'")
HAVE_DEPS = False
ANSIBLE_METADATA = {'status': ['deprecated'],
'supported_by': 'community',
@@ -84,7 +85,10 @@ options:
- desired admin state of the created router .
required: false
default: true
requirements: ["quantumclient", "neutronclient", "keystoneclient"]
requirements:
- "python >= 2.6"
- "python-neutronclient or python-quantumclient"
- "python-keystoneclient"
'''
EXAMPLES = '''
@@ -189,6 +193,8 @@ def main():
admin_state_up = dict(type='bool', default=True),
))
module = AnsibleModule(argument_spec=argument_spec)
if not HAVE_DEPS:
module.fail_json(msg='python-keystoneclient and either python-neutronclient or python-quantumclient are required')
neutron = _get_neutron_client(module, module.params)
_set_tenant_id(module)
@@ -212,5 +218,6 @@ def main():
# this is magic, see lib/ansible/module.params['common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -22,6 +22,7 @@ try:
except ImportError:
from quantumclient.quantum import client
from keystoneclient.v2_0 import client as ksclient
HAVE_DEPS = True
except ImportError:
HAVE_DEPS = False
@@ -79,7 +80,10 @@ options:
- Name of the external network which should be attached to the router.
required: true
default: None
requirements: ["quantumclient", "neutronclient", "keystoneclient"]
requirements:
- "python >= 2.6"
- "python-neutronclient or python-quantumclient"
- "python-keystoneclient"
'''
EXAMPLES = '''
@@ -192,6 +196,8 @@ def main():
state = dict(default='present', choices=['absent', 'present']),
))
module = AnsibleModule(argument_spec=argument_spec)
if not HAVE_DEPS:
module.fail_json(msg='python-keystoneclient and either python-neutronclient or python-quantumclient are required')
neutron = _get_neutron_client(module, module.params)
router_id = _get_router_id(module, neutron)
@@ -220,5 +226,6 @@ def main():
# this is magic, see lib/ansible/module.params['common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -22,6 +22,7 @@ try:
except ImportError:
from quantumclient.quantum import client
from keystoneclient.v2_0 import client as ksclient
HAVE_DEPS = True
except ImportError:
HAVE_DEPS = False
@@ -84,7 +85,10 @@ options:
- Name of the tenant whose subnet has to be attached.
required: false
default: None
requirements: ["quantumclient", "keystoneclient"]
requirements:
- "python >= 2.6"
- "python-neutronclient or python-quantumclient"
- "python-keystoneclient"
'''
EXAMPLES = '''
@@ -224,6 +228,8 @@ def main():
state = dict(default='present', choices=['absent', 'present']),
))
module = AnsibleModule(argument_spec=argument_spec)
if not HAVE_DEPS:
module.fail_json(msg='python-keystoneclient and either python-neutronclient or python-quantumclient are required')
neutron = _get_neutron_client(module, module.params)
_set_tenant_id(module)
@@ -253,5 +259,6 @@ def main():
# this is magic, see lib/ansible/module.params['common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -34,6 +34,9 @@ version_added: "2.0"
author: "Monty Taylor (@emonty)"
description:
- Retrieve an auth token from an OpenStack Cloud
requirements:
- "python >= 2.6"
- "shade"
extends_documentation_fragment: openstack
'''
@@ -69,4 +72,5 @@ def main():
# this is magic, see lib/ansible/module_common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -97,6 +97,7 @@ options:
IP completely, or only detach it from the server. Default is to detach only.
required: false
default: false
version_added: "2.1"
requirements: ["shade"]
'''

View File

@@ -32,6 +32,7 @@ DOCUMENTATION = '''
module: os_ironic
short_description: Create/Delete Bare Metal Resources from OpenStack
extends_documentation_fragment: openstack
author: "Monty Taylor (@emonty)"
version_added: "2.0"
description:
- Create or Remove Ironic nodes from OpenStack.
@@ -75,28 +76,30 @@ options:
- Information for this server's driver. Will vary based on which
driver is in use. Any sub-field which is populated will be validated
during creation.
suboptions:
power:
- Information necessary to turn this server on / off. This often
includes such things as IPMI username, password, and IP address.
description:
- Information necessary to turn this server on / off.
This often includes such things as IPMI username, password, and IP address.
required: true
deploy:
- Information necessary to deploy this server directly, without
using Nova. THIS IS NOT RECOMMENDED.
description:
- Information necessary to deploy this server directly, without using Nova. THIS IS NOT RECOMMENDED.
console:
- Information necessary to connect to this server's serial console.
Not all drivers support this.
description:
- Information necessary to connect to this server's serial console. Not all drivers support this.
management:
- Information necessary to interact with this server's management
interface. May be shared by power_info in some cases.
description:
- Information necessary to interact with this server's management interface. May be shared by power_info in some cases.
required: true
nics:
description:
- A list of network interface cards, eg, " - mac: aa:bb:cc:aa:bb:cc"
- 'A list of network interface cards, eg, " - mac: aa:bb:cc:aa:bb:cc"'
required: true
properties:
description:
- Definition of the physical characteristics of this server, used for
scheduling purposes
- Definition of the physical characteristics of this server, used for scheduling purposes
suboptions:
cpu_arch:
description:
- CPU architecture (x86_64, i686, ...)
@@ -111,8 +114,7 @@ options:
default: 1
disk_size:
description:
- size of first storage device in this machine (typically
/dev/sda), in GB
- size of first storage device in this machine (typically /dev/sda), in GB
default: 1
skip_update_of_driver_password:
description:

View File

@@ -32,7 +32,9 @@ DOCUMENTATION = '''
---
module: os_ironic_node
short_description: Activate/Deactivate Bare Metal Resources from OpenStack
author: "Monty Taylor (@emonty)"
extends_documentation_fragment: openstack
version_added: "2.0"
description:
- Deploy to nodes controlled by Ironic.
options:
@@ -71,6 +73,7 @@ options:
- Definition of the instance information which is used to deploy
the node. This information is only required when an instance is
set to present.
suboptions:
image_source:
description:
- An HTTP(S) URL where the image can be retrieved from.

View File

@@ -31,7 +31,8 @@ DOCUMENTATION = '''
---
module: os_object
short_description: Create or Delete objects and containers from OpenStack
version_added: "1.10"
version_added: "2.0"
author: "Monty Taylor (@emonty)"
extends_documentation_fragment: openstack
description:
- Create or Delete objects and containers from OpenStack
@@ -60,7 +61,6 @@ options:
- Should the resource be present or absent.
choices: [present, absent]
default: present
requirements: ["shade"]
'''
EXAMPLES = '''

View File

@@ -32,6 +32,7 @@ DOCUMENTATION = '''
module: os_security_group
short_description: Add/Delete security groups from an OpenStack cloud.
extends_documentation_fragment: openstack
author: "Monty Taylor (@emonty)"
version_added: "2.0"
description:
- Add or Remove security groups from an OpenStack cloud.

View File

@@ -32,7 +32,7 @@ DOCUMENTATION = '''
module: os_security_group_rule
short_description: Add/Delete rule from an existing security group
extends_documentation_fragment: openstack
version_added: "1.10"
version_added: "2.0"
description:
- Add or Remove rule from an existing security group
options:
@@ -81,7 +81,6 @@ options:
- Should the resource be present or absent.
choices: [present, absent]
default: present
requirements: ["shade"]
'''
@@ -257,7 +256,6 @@ def _system_state_change(module, secgroup, remotegroup):
def main():
argument_spec = openstack_full_argument_spec(
security_group = dict(required=True),
# NOTE(Shrews): None is an acceptable protocol value for

View File

@@ -45,12 +45,10 @@ options:
description:
- Name that has to be given to the instance
required: true
default: None
image:
description:
- The name or id of the base image to boot.
required: true
default: None
image_exclude:
description:
- Text to use to filter image names, for the case, such as HP, where
@@ -110,7 +108,7 @@ options:
default: 'yes'
aliases: ['auto_floating_ip', 'public_ip']
floating_ips:
decription:
description:
- list of valid floating IPs that pre-exist to assign to this node
required: false
default: None
@@ -648,4 +646,5 @@ def main():
# this is magic, see lib/ansible/module_common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -44,11 +44,11 @@ options:
- Should the resource be present or absent.
choices: [present, absent]
default: present
required: false
server:
description:
- Name or ID of server you want to attach a volume to
required: true
default: None
volume:
description:
- Name or id of volume you want to attach to a server
@@ -58,7 +58,9 @@ options:
- Device you want to attach. Defaults to auto finding a device name.
required: false
default: None
requirements: ["shade"]
requirements:
- "python >= 2.6"
- "shade"
'''
EXAMPLES = '''
@@ -153,4 +155,5 @@ def main():
# this is magic, see lib/ansible/module_utils/common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -47,7 +47,6 @@ options:
description:
- Name of volume
required: true
default: None
display_description:
description:
- String describing the volume
@@ -59,7 +58,7 @@ options:
required: false
default: None
image:
descritpion:
description:
- Image name or id for boot from volume
required: false
default: None
@@ -73,7 +72,9 @@ options:
- Should the resource be present or absent.
choices: [present, absent]
default: present
requirements: ["shade"]
requirements:
- "python >= 2.6"
- "shade"
'''
EXAMPLES = '''
@@ -162,4 +163,5 @@ def main():
# this is magic, see lib/ansible/module_common.py
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()
if __name__ == '__main__':
main()

View File

@@ -109,7 +109,7 @@ options:
- Data to be uploaded to the servers config drive. This option implies
I(config_drive). Can be a file path or a string
version_added: 1.8
wait
wait:
description:
- wait for the scaling group to finish provisioning the minimum amount of
servers
@@ -121,7 +121,7 @@ options:
description:
- how long before wait gives up, in seconds
default: 300
author: Matt Martz
author: "Matt Martz (@sivel)"
extends_documentation_fragment: rackspace
'''

View File

@@ -203,6 +203,10 @@ EXAMPLES = '''
type: vmxnet3
network: VM Network
network_type: standard
nic2:
type: vmxnet3
network: dvSwitch Network
network_type: dvs
vm_hardware:
memory_mb: 2048
num_cpus: 2
@@ -251,7 +255,6 @@ EXAMPLES = '''
hostname: esx001.mydomain.local
# Deploy a guest from a template
# No reconfiguration of the destination guest is done at this stage, a reconfigure would be needed to adjust memory/cpu etc..
- vsphere_guest:
vcenter_hostname: vcenter.mydomain.local
username: myuser