Commit Graph

611 Commits (1609afbd12abb68d1434ee5ce56fe09e12a53fdb)

Author SHA1 Message Date
Alex Kessinger 4d227e508d Fix a argument mismatch in elasticache
I think in this commit 720aeffca2bd2ae1eca158abc2d1463a8597afb6

There was bug introduced where the ElastiCacheManager init method has
a number of positional arguments like so.

```py
    def __init__(self, module, name, engine, cache_engine_version, node_type,
                 num_nodes, cache_port, parameter_group, cache_subnet_group,
                 cache_security_groups, security_group_ids, zone, wait,
                 hard_modify, region, **aws_connect_kwargs):
```

But then later in the code the positional arguments are passed in
like this.

```py
    elasticache_manager = ElastiCacheManager(module, name, engine,
                                             cache_engine_version, node_type,
                                             num_nodes, cache_port,
                                             cache_subnet_group,
                                             cache_security_groups,
                                             security_group_ids, parameter_group, zone, wait,
                                             hard_modify, region, **aws_connect_kwargs)
```

If you count, you can see that cache_subnet_group, is being passed in
where the manager expects to see parameter_group.
2016-12-08 11:23:38 -05:00
Jens Carl 00f9dfac34 Change type of parameter 'template' to 'path'. 2016-12-08 11:23:38 -05:00
Gerard Lynch f85a8ac746 allow use of volume_type in volumes dict 2016-12-08 11:23:37 -05:00
Jens Carl 507111f090 Fix to handle user directory within parameter 'template'. 2016-12-08 11:23:37 -05:00
Tom Bamford dbf882a600 Clarify available options for device_mapping parameter of ec2_ami module 2016-12-08 11:23:37 -05:00
Shawn Silva 2962dabeda Fix for modifying the size of an RDS instance. When attempting to modify the size of an RDS instance Ansible succeeds and returns a "changed" status. However, no changes are applied to the RDS instance. Boto is looking for a keyword parameter of "allocated_storage" to update the size, and this parameter wasn't being included. 2016-12-08 11:23:37 -05:00
Selivanov Pavel 63d2575f9f ec2_group.py: added ICMP rule example 2016-12-08 11:23:37 -05:00
Nathaniel Felsen ec14a5c728 Adding support for access logs in ELB 2016-12-08 11:23:37 -05:00
whiter 82c898be5a Remove 'str' type so that json is properly quoted 2016-12-08 11:23:36 -05:00
evanccnyc@users.noreply.github.com ff81aa11c0 Fixing ec2_asg termination_policy
If this isnt set, it wont launch the instances because it needs to default to "Default" despite what boto docs say.
2016-12-08 11:23:36 -05:00
Frank van Tol db6c6ec5c9 Update s3.py
We are copying from S3,  the bucket is the source, not the target.
2016-12-08 11:23:36 -05:00
Rob 08999ecfd1 Update iam_policy.py
Fixed doc for policy_name - it is a required field
Removed empty aliases
2016-12-08 11:23:36 -05:00
Gerard Lynch 3339749017 order params, add missing tag param. update examples 2016-12-08 11:23:36 -05:00
Toshio Kuratomi 29cfd80220 Fix improper indentation 2016-12-08 11:23:36 -05:00
Evan Carter 5cd3217fc8 fixing termination policies for ec2_asg 2016-12-08 11:23:35 -05:00
Evan Carter e9c04cfdfd Fixing bug #2058 and adding some backwards compatibility 2016-12-08 11:23:35 -05:00
Rob 4f9bb86e58 Add exception handling to iam 2016-12-08 11:23:35 -05:00
wimnat 540061c9fc Remove unnecessary json.loads 2016-12-08 11:23:35 -05:00
Tom Fotherby 135e7c60de Fix #1984 - allow load_balancer_port as a variable 2016-12-08 11:23:35 -05:00
Yanchek99 ebbd206e86 Fixed typo for instance_tags documentation 2016-12-08 11:23:35 -05:00
Taneli Lepp fb317c72b6 Added option to set multiple ACLs for S3 objects. Also verifies the selected permissions against Boto's canned ACL strings list. 2016-12-08 11:23:35 -05:00
Bret Martin b1c5b17155 Use general-purpose parameter mutual exclusion code for network_interfaces 2016-12-08 11:23:35 -05:00
Bret Martin 0afa813324 Add alias `network_interface` and accept a string for a single ENI 2016-12-08 11:23:35 -05:00
Bret Martin df8b2d45bc Add network_interfaces example 2016-12-08 11:23:35 -05:00
Bret Martin 96d8401fb4 Remove aliases specification from documentation since there are none 2016-12-08 11:23:35 -05:00
Brian Coca 281a92bbdd corrected whitepace 2016-12-08 11:23:34 -05:00
Toshio Kuratomi b952dff2c1 correct documentation formatting 2016-12-08 11:23:34 -05:00
Bret Martin df713192b4 Add network_interfaces parameter to ec2 module to support launch-time ENIs 2016-12-08 11:23:34 -05:00
Toshio Kuratomi 33f5afa779 Make sure listener ports are ints.
May fix #1984
2016-12-08 11:23:34 -05:00
Bruno Galindro da Costa 6f36629d13 Added termination_policies option 2016-12-08 11:23:33 -05:00
Toshio Kuratomi ffbd1efaa7 Remove non-ascii quote char 2016-12-08 11:23:33 -05:00
Rick Mendes 8048c4482a using single device_id and enabling release on disassociation 2016-12-08 11:23:33 -05:00
Timothy Appnel 488749500e Clarified and cleaned up grammar of error messages. 2016-12-08 11:23:33 -05:00
Timothy Appnel d811a51744 Fixed call to undefined attribute when RDS module timeouts waiting. 2016-12-08 11:23:33 -05:00
Till Backhaus e005ef0c36 Delete dead and broken code 2016-12-08 11:23:33 -05:00
James Cammarata b9ca912ffe Fixing region requirement regarding euca clusters
Fixes ansible/ansible#11023
2016-12-08 11:23:32 -05:00
Jason Cowley 2c511a9470 Add support for S3 canned permissions. resolves #1939 2016-12-08 11:23:32 -05:00
David M. Lee 4cd2fcf917 ec2_vol: Added missing "needs 2.0" doc
The ability to find-or-create a volume was added in 2.0. Added note to
the example.
2016-12-08 11:23:32 -05:00
Evan Carter c1526ff87b Adding the ability to associate eips with network interfaces 2016-12-08 11:23:31 -05:00
Scot Spinner 0fff871819 one thing missed 2016-12-08 11:23:31 -05:00
HAMSIK Adam 217764ba3c Rebase start/stop instance pull code 2016-12-08 11:23:31 -05:00
Michael J. Schultz c7eb08b217 Return an iterable instead of None
By default `.get()` will return `None` on a key that doesn't exist. This
causes a `TypeError` in the `for` loop a few lines down. This change simply
returns an iterable type to avoid the error.
2016-12-08 11:23:30 -05:00
Toshio Kuratomi a765411284 Another way that the serialization of the boto results can fail 2016-12-08 11:23:30 -05:00
Toshio Kuratomi cae0c2741c Another launchconfig field needs to be explicitly converted for json serialization
Fixes #1848
2016-12-08 11:23:30 -05:00
Ted Timmons 7027de77b7 fix ugly documentation
current version dumps a character per line in the docs: http://docs.ansible.com/ansible/cloudformation_module.html
2016-12-08 11:23:29 -05:00
Scot Spinner bcc57875ed adding parameter group option 2016-12-08 11:23:29 -05:00
Rowan Wookey 7d85477acb Fixes #542 error when ec2_asg arguments aren't specified
If max_size/min_size/desired_capacity are omitted
when updating an autoscaling group use the existing values
2016-12-08 11:23:28 -05:00
Robb Wagoner aed7d903ee Include a CFN stack's resources in the result 2016-12-08 11:23:28 -05:00
Matt Ferrante 74b4882415 ec2_ami can update an ami's launch_permissions 2016-12-08 11:23:28 -05:00
Robert Jailall 6530e76880 Refactor ec2_snapshot to make it more testable 2016-12-08 11:23:28 -05:00
Hagai Kariti 83aff77c26 made `wait` default to True in ec2_snapshot 2016-12-08 11:23:28 -05:00
Hagai Kariti fcd2b354b2 Add to the ec2_snapshot module the ability to create a snapshot only if one hasn't recently been created
- Added snapshot_max_age parameter
- Updated docs
- Made the default value of wait to be false, as it used to be
2016-12-08 11:23:28 -05:00
Toshio Kuratomi 49ee99fe73 result is now a dict and so needs different access syntax
Fixes #1848
2016-12-08 11:23:27 -05:00
Toshio Kuratomi b91684b8ad Remove unneeded urllib2 import 2016-12-08 11:23:27 -05:00
James Cammarata 99075976a8 Fix missing params to download_s3file in s3 2016-12-08 11:23:27 -05:00
James Cammarata 689f13548f Fixing s3 failures when bucket names contain dots 2016-12-08 11:23:27 -05:00
Luke Rohde 05974273b3 Use msg kwarg to pass error message in ec2_snapshot 2016-12-08 11:23:27 -05:00
Brian Coca cd072e3090 added version added to headers in s3 2016-12-08 11:23:26 -05:00
Jaime Gago b203deee31 Fix example indentation bug 2016-12-08 11:23:26 -05:00
Toshio Kuratomi 103b150090 Convert object into dict so it will turn into json properly 2016-12-08 11:23:26 -05:00
Brian Coca 357d542bb3 clarified error messages to actually give back ansible module option instead of internal boto field name 2016-12-08 11:23:26 -05:00
Jens Carl c0eedc6e87 Fix missing alias "groups". 2016-12-08 11:23:26 -05:00
Feanil Patel e4898a4348 If overwrite is set, download eagerly.
If the we are going to overwrite the file anyway,
there is no need to do any checksums locally or
grab the remote etag.
2016-12-08 11:23:26 -05:00
billwanjohi 167e940e78 iam: don't delete passwords by default 2016-12-08 11:23:25 -05:00
Mike Putnam 9623cd570c Add missing GPLv3 License header
Fixes #1643
2016-12-08 11:23:25 -05:00
Ash Caire 682bf34a43 add headers param to s3 uploads 2016-12-08 11:23:25 -05:00
khassen 8b60dd349d Use the common/shared MD5 function. 2016-12-08 11:23:25 -05:00
Toshio Kuratomi 55271467d4 Remove validate_certs as the url is not user settable so we always want to validate the certificate 2016-12-08 11:23:24 -05:00
Artur Cygan d71b1444a9 Update route53.py
Fix typos
2016-12-08 11:23:24 -05:00
Baraa Basata 63a619fbae Fix iam_policy example 2016-12-08 11:23:24 -05:00
Brian Coca 9b38e47d70 added rickmendes as maintainer 2016-12-08 11:23:23 -05:00
ayush f46daacf67 Updated doc strings so each character isn't considered a line 2016-12-08 11:23:23 -05:00
Toshio Kuratomi 8eba30b488 Deprecated _ec2_ami_search now verifies SSL certificates 2016-12-08 11:23:23 -05:00
Brian Coca fedd1bed1f minor doc fixes, version added for latest feature 2016-12-08 11:23:22 -05:00
Herby Gillot c0676f93f5 rds: add the ability to reboot RDS instances 2016-12-08 11:23:22 -05:00
Eero Niemi 1f560f8dae Fixed parameter validation when creating a volume from a snapshot 2016-12-08 11:23:22 -05:00
whiter 2dc689894c Added 'resource_tags' alias 2016-12-08 11:23:22 -05:00
Brian Coca a0b0c022b8 corrected version_added 2016-12-08 11:23:22 -05:00
Brian Coca ec6e75f1cc attempt to fix check mode when state='absent' 2016-12-08 11:23:21 -05:00
HAMSIK Adam e04a4a4114 Use mutually_exclusive in AnsibleModule 2016-12-08 11:23:21 -05:00
HAMSIK Adam 3d3be5e91f Fix missing , 2016-12-08 11:23:21 -05:00
whiter a5a9c92fcd Fixed dicts comparison for tags 2016-12-08 11:23:21 -05:00
whiter 54b02ee0da ec2_vpc_net refactor 2016-12-08 11:23:21 -05:00
HAMSIK Adam b7a13e263f Add version 2016-12-08 11:23:21 -05:00
HAMSIK Adam 05df069176 Add module parameter for security group name. This make ec2_elb_lb module consitent with others 2016-12-08 11:23:21 -05:00
Brian Coca 16a4ff3462 fixed minor doc issues 2016-12-08 11:23:21 -05:00
Brian Coca 0cab021168 Revert "Revert "ec2_lc - include all launch config properties in the return"" 2016-12-08 11:23:20 -05:00
Brian Coca af8ded66cc Revert "ec2_lc - include all launch config properties in the return" 2016-12-08 11:23:20 -05:00
Frank van Tol 39e24e89f4 Remove default port value, it does not work in _requires_destroy_and_create logic
When creating a Redis cluster, every run it gets destroyed and recreated because the port number of memcached is used as the default.
2016-12-08 11:23:20 -05:00
Frank van Tol 6655cd89c4 Update elasticache.py 2016-12-08 11:23:20 -05:00
Frank van Tol 426f93a291 Remove default for engine_version
Redis and memcached have different engine version numbering, there can not be a shared default value.
2016-12-08 11:23:20 -05:00
Apoorva Kulkarni 1f35e578b4 s3 module: Add missing version tag to "encrypt" parameter 2016-12-08 11:23:20 -05:00
Evan Carter d3ef622627 Adding default cooldown to AWS ASG 2016-12-08 11:23:20 -05:00
vanga ddd399fe7a Throw error if encryption is set while passing a snapshot id 2016-12-08 11:23:20 -05:00
Joel Thompson f1ab33ad7b Adding ability to filter AWS Route 53 private hosted zones by attached VPC 2016-12-08 11:23:19 -05:00
Juho-Mikko Pellinen 29620b78fa Change the default flag value to None to prevent AWS complaining: "Instance creation failed => InvalidBlockDeviceMapping: the encrypted flag cannot be specified since device /dev/sda1 has a snapshot specified." 2016-12-08 11:23:18 -05:00
Flyte 2f46364921 Provide correct kwargs to rds2 connection when making a final snapshot 2016-12-08 11:23:18 -05:00
Juho-Mikko Pellinen 321244d881 Remove empty aliases 2016-12-08 11:23:17 -05:00
Juho-Mikko Pellinen 54af79692a Add version number 2016-12-08 11:23:17 -05:00
Juho-Mikko Pellinen f016cb556b Fix hosted_zone_id after rebase. 2016-12-08 11:23:17 -05:00
Juho-Mikko Pellinen 3f2d1e6bfa Add support for specifying unique hosted zone identifier 2016-12-08 11:23:17 -05:00
Scott Miller 62b6cf85d3 Update cloudformation.py
Fix for inaccurate phrasing
2016-12-08 11:23:17 -05:00
Robb Wagoner 848e9de950 remove double dict & fix increment bug 2016-12-08 11:23:16 -05:00
Mike Putnam 0e6e3e097e Upstream docs show launch_config_name as required.
http://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_AutoScalingGroup.html

Fixes #11209

Ansible behavior is correct, this commit just updates the docs to
reflect that correctness.
2016-12-08 11:23:16 -05:00
Jonathan Davila f1027ae6bc no_log to iam password 2016-12-08 11:23:16 -05:00
Scott Miller b43db1d2ff update docs for cloudformation 2016-12-08 11:23:15 -05:00
Robb Wagoner 372a2286db return health of instances and counts 2016-12-08 11:23:15 -05:00
Patrick Roby e638913c97 iterate through all keys in a more pythonic manner 2016-12-08 11:23:15 -05:00
Patrick Roby bc5d79fc30 update documentation, adding new params 2016-12-08 11:23:15 -05:00
Evan Carter 98756144cf Add ClassicLink settings to EC2_launchconfig 2016-12-08 11:23:15 -05:00
Andrea Mandolo ae1080d922 Added some block_device_mapping (disks) informations to EC2 instance module ouput 2016-12-08 11:23:15 -05:00
Andrea Mandolo a8da674cf4 Added "EC2 instance" termination_protection and source_dest_check changeability at run-time 2016-12-08 11:23:15 -05:00
Tom Paine df8013182e Parse out space characters in route53 value list
Fixes: https://github.com/ansible/ansible-modules-core/issues/992
2016-12-08 11:23:15 -05:00
Michael Weinrich 543cb13f42 Fix connection creation to allow usage of profiles with boto 2016-12-08 11:23:15 -05:00
Toshio Kuratomi f422782180 Use module.fail_json() instead of sys.exit() 2016-12-08 11:23:14 -05:00
Michael Weinrich a0466f1f8d Add the option to pass a string as policy 2016-12-08 11:23:14 -05:00
Jens Carl 9ad15cdae9 - List the name servers of a zone. 2016-12-08 11:23:13 -05:00
Robb Wagoner e025effc99 include all launch config properties in the return
make all properties available when registering the result
which is useful when wanting to launch a stand-alone instance based upon
an existing Launch Config.
2016-12-08 11:23:12 -05:00
Jonathan Davila 82b809f0e2 new vpc module. does not contain subnet or route table functionality.
changed name to ec2_vpc_net

refactored out IGW functionality
2016-12-08 11:23:12 -05:00
Michael Weinrich 1f6c177da0 Use aws connect calls that allow boto profile use 2016-12-08 11:23:12 -05:00
Patrick Roby b318bc8b43 Add support for listing keys in a specific S3 bucket
Includes support for specifying a prefix, marker, and/or max_keys. Returns a list of key names (as strings).
2016-12-08 11:23:11 -05:00
James Cammarata 4239922d07 Updating version_added for new spot_type param in ec2 module
Also made sure 'choices' were set on the module param, to catch errors
in user's playbooks, etc.
2016-12-08 11:23:11 -05:00
Jay Taylor ed279d8175 Added support for spot request type specification (to support persistent spot requests). 2016-12-08 11:23:11 -05:00
zimbatm 99e2557b42 route53: add support for routing policies
It is now possible to pass various routing policies if an identity is
provided.

This commit also introduces multiple optimisations:
* Only fetch records for the given domain
* Use UPSERT instead of DELETE+CREATE to update existing records
2016-12-08 11:23:11 -05:00
billwanjohi 86e679fe3c iam: use modern helper to allow sts
previous implementation ignored the session token when present
2016-12-08 11:23:11 -05:00
toninog bea77c938e fixes to code to enable updates of user to groups and delete groups. Fixed example yaml to use groups 2016-12-08 11:23:10 -05:00
toninog ab7678f199 Fixed more issues with the delete_group and paramater mismatch 2016-12-08 11:23:10 -05:00
Jonathan Davila 6482ad964f iam certificate module
boto import tweak

style patch
2016-12-08 11:23:10 -05:00
Dan Abel a51a8e1fd6 use aws connect calls that allow boto profile use 2016-12-08 11:23:10 -05:00
Colin Hutchinson 97a2cd0bd9 Indentation fix for with and register in the ec2_vol example 2016-12-08 11:23:09 -05:00
Philip Kirkland cc214afed6 adding 'encrypted' option into volume dict so ec2 module can easily include encrypted volumes 2016-12-08 11:23:09 -05:00
nitzmahone 548ab163f5 Added choice validation for state arg
fixes traceback on invalid state arg
2016-12-08 11:23:08 -05:00
Greg DeKoenigsberg 18ca7aee07 Updating cloud modules with proper github author information 2016-12-08 11:23:07 -05:00
Robert Estelle 8b2327fe3a Fix missing instance_id param in ec2_eip. 2016-12-08 11:23:07 -05:00
Hagai Kariti b154ad4cbb ec2_vol: fix race conditions because we handle errors before actually deleting
Just try to delete the volume and handle the error amazon sends
2016-12-08 11:23:07 -05:00
Tyler Cross 9babe9b07d Get specific object version with S3 module.
- allow specifying version for mode=get and mode=getstr
- when version specified doesn't exist give an error message that indicates so
2016-12-08 11:23:07 -05:00
Robert Estelle ecae3403af Remove unnecessary wait_timeout parameter. 2016-12-08 11:23:07 -05:00
Robert Estelle 3798c8c0ce Refactoring of ec2_eip module. 2016-12-08 11:23:07 -05:00
Robert Estelle 41f7e4ed5e ec2_eip - PEP8 and minor style cleanups. 2016-12-08 11:23:07 -05:00
Robert Estelle a41994974c EC2 Security Group - Validate parameters. 2016-12-08 11:23:07 -05:00
Ching Yi, Chan be9cddbddf Refactoring for easier to read 2016-12-08 11:23:06 -05:00
Ching Yi, Chan 7cafbb5f05 Prevent memory-error from a large file 2016-12-08 11:23:06 -05:00
Soenke Ruempler b57bcac72f Add support for SNS notification ARNs in CloudFormation 2016-12-08 11:23:06 -05:00
Andrea Mandolo adb53cc3c5 Add "block_device_mapping" parameter on EC2_AMI Amazon module (DOCUMENTATION) - upgraded 2016-12-08 11:23:06 -05:00
Bruce Pennypacker 4cb7df2631 Added delobj command to delete an object within a bucket 2016-12-08 11:23:06 -05:00
Alex Gandy 75fa5811db Added volumes dict to ec2_lc example 2016-12-08 11:23:05 -05:00
toninog 15b65fa115 Fixed bug in example where updating a user to a group Fixed bug in create_group and update_group whereby paramaters were not being set correctly. 2016-12-08 11:23:05 -05:00
Benno Joy f6f2359400 fix for 11177 where module readds rule even if the rules exists 2016-12-08 11:23:05 -05:00
Brian Coca 5ae6f5b767 reverting pep changes that were breaking documentation 2016-12-08 11:23:04 -05:00
Brian Coca 336c22bfd9 made non exec 2016-12-08 11:23:04 -05:00
Tim Mahoney fb3c457122 Elasticache Subnet Group 2016-12-08 11:23:04 -05:00
Sankalp Khare f7055c88de Fixed a typo in ec2_vpc module documentation 2016-12-08 11:23:04 -05:00
billwanjohi ff7dfefbd6 cloudformation: accept local templates in yaml format
Since the YAML data format is a subset of JSON, it is trivial to convert
the former to the latter. This means that we can use YAML templates to
build cloudformation stacks, as long as we translate them before passing
them to the AWS API. I figure this could potentially be quite popular in
the Ansible world, since we already use so much YAML for our playbooks.
2016-12-08 11:23:04 -05:00
James Martin 38d0f31cac Streamlined rolling udpate algorithm. Still need to account for partials, and not waiting for instances if we're mass terminating them. 2016-12-08 11:23:04 -05:00
whiter fc53c2431d Added changed=True flag when new subnet groups created. Added conditional so that modify_db_subnet_group is only called when necessary and changed=True flag will be set. 2016-12-08 11:23:04 -05:00
Jonathan Davila 77fa67a240 author fix 2016-12-08 11:23:04 -05:00
Jonathan Davila d4aff86349 iam_policy 2016-12-08 11:23:04 -05:00
Trevor Pounds 9de952cb3f Instance deregistration should try all associated ELBs. Fixes #869 2016-12-08 11:23:04 -05:00
Trevor Pounds eff6307ac3 Use auto scaling group managed ELBs if present. 2016-12-08 11:23:04 -05:00
Jonathan Davila a329dc05c0 iam module with fixes
iam module. fix policy issue.

bugfix

allow for modifying path without declaring new_path
2016-12-08 11:23:04 -05:00
Raghu Udiyar e6e8f65e92 Creating ami should be idempotent
If the ami already exists, return details of the duplicate
ami instead of failing with an error.
2016-12-08 11:23:04 -05:00
tedder dd6d5f0cb5 feature pull request: catch and retry recoverable errors
boto can throw SSLError when timeouts occur (among other SSL errors). Catch these so proper JSON can be returned, and also add the ability to retry the operation.

There's an open issue in boto for this: https://github.com/boto/boto/issues/2409

Here's a sample stacktrace that inspired me to work on this. I'm on 1.7, but there's no meaningful differences in the 1.8 release that would affect this. I've added line breaks to the trace for readability.

    failed to parse: Traceback (most recent call last):
      File "/home/ubuntu/.ansible/tmp/ansible-tmp-1419895753.17-160808281985012/s3", line 2031, in <module> main()
      File "/home/ubuntu/.ansible/tmp/ansible-tmp-1419895753.17-160808281985012/s3", line 353, in main download_s3file(module, s3, bucket, obj, dest)
      File "/home/ubuntu/.ansible/tmp/ansible-tmp-1419895753.17-160808281985012/s3", line 234, in download_s3file key.get_contents_to_filename(dest)
      File "/usr/local/lib/python2.7/dist-packages/boto/s3/key.py", line 1665, in get_contents_to_filename response_headers=response_headers)
      File "/usr/local/lib/python2.7/dist-packages/boto/s3/key.py", line 1603, in get_contents_to_file response_headers=response_headers)
      File "/usr/local/lib/python2.7/dist-packages/boto/s3/key.py", line 1435, in get_file query_args=None)
      File "/usr/local/lib/python2.7/dist-packages/boto/s3/key.py", line 1488, in _get_file_internal for bytes in self:
      File "/usr/local/lib/python2.7/dist-packages/boto/s3/key.py", line 368, in next data = self.resp.read(self.BufferSize)
      File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 416, in read return httplib.HTTPResponse.read(self, amt)
      File "/usr/lib/python2.7/httplib.py", line 567, in read s = self.fp.read(amt)
      File "/usr/lib/python2.7/socket.py", line 380, in read data = self._sock.recv(left)
      File "/usr/lib/python2.7/ssl.py", line 341, in recv return self.read(buflen)
      File "/usr/lib/python2.7/ssl.py", line 260, in read return self._sslobj.read(len) ssl.SSLError: The read operation timed out
2016-12-08 11:23:04 -05:00
Feanil Patel 36dfb78831 Output the Internet Gatewoy id directly instead of in a dict. 2016-12-08 11:23:03 -05:00
Benno Joy 70188fe02a Fixes issue 1197 for s3 module, where the file gets downloaded even if checksums match 2016-12-08 11:23:03 -05:00
Feanil Patel bfb36f0f1f Tell me what the igw id is if we created an igw. 2016-12-08 11:23:03 -05:00
xiaclo 8715ce07ae Fix issue #1156
Fix as suggested in the issue.

https://github.com/ansible/ansible-modules-core/issues/1156
2016-12-08 11:23:03 -05:00
billwanjohi a6fd78af37 s3 put: add support for server-side encryption
- added 'encrypt' boolean option
- reordered module options alphanumerically
2016-12-08 11:23:02 -05:00
Toshio Kuratomi b6a312e489 Minor fixups found during review of #582 2016-12-08 11:23:02 -05:00
whiter d252e7c08f Fix for issue #1332 - when instance is has finished deleting and get_db_instance returns None, exit gracefully 2016-12-08 11:23:01 -05:00
Wang Qiang 86b6f39cf0 Do instance update after add tags to instance. 2016-12-08 11:23:01 -05:00
marko de813195c5 Added support for foreign security groups (Fixes: #373) 2016-12-08 11:23:01 -05:00
Jonathan Mainguy ce4c9cccf5 fixes example documenation 2016-12-08 11:23:00 -05:00
Toshio Kuratomi 7e5a4afb6b Update module "imports" to new style
Fixes #1351
2016-12-08 11:23:00 -05:00
Benno Joy d24fbf5c3e fixe issue #600, where ec2 module returns instance state as runing even after instance is terminated 2016-12-08 11:22:59 -05:00
whiter 0eb17142b5 Added postgresql-license type 2016-12-08 11:22:59 -05:00
zimbatm 933256fc63 ec2_group: prioritise current VPC group names over others 2016-12-08 11:22:59 -05:00
zimbatm c3e720a393 ec2_group: select own group if the name matches
This fixes an issue where multiple VPC have the same group name and
the one from the other VPC is selected.
2016-12-08 11:22:58 -05:00
Martin Froehlich 8bff781a0a Use get_aws_connection_info to get AWS creds.
Previously used get_ec2_creds did not consider security_token,
making MFA requests fail.
2016-12-08 11:22:58 -05:00
Jan Brauer af689dece3 Handle the case where a stack rollback fails. 2016-12-08 11:22:58 -05:00
Matt Schurenko ef140a084a adding stickiness support to ec2_elb_lb.py
removing policy if enabled is no

adding sanity checks

removing debuging

check if policy exists before deleting

updating version_added to 2.0

adding stickiness support to ec2_elb_lb.py (squashed commit)
2016-12-08 11:22:58 -05:00
Jell 2e007167b9 Find or Create volume by name 2016-12-08 11:22:58 -05:00
Toshio Kuratomi 5336217649 Several cleanups to many modules:
* Fix docs to specify when python2.6+ is required (due to a library
  dep).  This helps us know when it is okay to use python2.6+ syntax in
  the file.
* remove BabyJson returns.  See #1211  This commit fixes all but the
  openstack modules.
* Use if __name__ == '__main__' to only run the main part of the module
  if the module is run as a program.  This allows for the potential to
  unittest the code later.
2016-12-08 11:22:58 -05:00
Chris Lundquist 7b4107a169 fix ami_search doc copy pasta 2016-12-08 11:22:58 -05:00
Benno Joy fc1ad5e1f1 fixes issue 122, where the module recreates the route table in each run 2016-12-08 11:22:58 -05:00
Bret Martin b2453bf9a3 ec2_vpc module: add route table resource tagging 2016-12-08 11:22:57 -05:00
Herby Gillot 6a39dc891a Use existing ec2_eip address if already associated
If an EC2 instance is already associated with an EIP address, we use
that, rather than allocating a new EIP address and associating it with
that.

Fixes #35.
2016-12-08 11:22:57 -05:00
(@cewood) 17b5d851f2 Support specifying cidr_ip as a list
Update/fix to Support specifying cidr_ip as a list

Unicode isn't compatible with python2, so we needed some other
solution to this problem. The simplest approach is if the ip item
isn't already a list, simply convert it to one, and we're done.
Thanks to @mspiegle for this suggestion.
2016-12-08 11:22:57 -05:00
Sam Doiron a3ec0a1562 Fix Issue #1216 (ValueError with Amazon RDS)
Fix typo where wrong variable was used, causing ValueError.
2016-12-08 11:22:57 -05:00
Alex Feinberg 1ac9c20b6e Fix a typo in create_instances
Fix a typo in create_instances: use 'placement_group' instead of placement_group
when calling boto_siupports_param_in_spot_request().
2016-12-08 11:22:57 -05:00
Brian Coca 2e9462aa21 minor doc fixes, set version added for new tags: parameter should Fix #10894 2016-12-08 11:22:56 -05:00
Brian Coca b5b34f6931 removed unused and undefined aws_regions 2016-12-08 11:22:56 -05:00
Brian Coca 953ed0aecc avoid exception when boto is not available 2016-12-08 11:22:56 -05:00
Brian Coca 5e892b894b removed redundant region def 2016-12-08 11:22:56 -05:00
Bobby Calderwood cd14b8115b Fixes regression introduced by edf1ac1ea6ffd5d44bb2bb62ad320364baf310a3 2016-12-08 11:22:55 -05:00
bw-will-usher efd2cc6089 Fixed MS SQL port number in documentation (1443->1433) per: https://support.microsoft.com/en-us/kb/287932 2016-12-08 11:22:55 -05:00
Brian Coca 88e3c19e9a added new ec2_ami_find as per #905 2016-12-08 11:22:54 -05:00
Brian Coca 2733705a19 deprecated ec2_ami_search 2016-12-08 11:22:54 -05:00
sisso 17a409f20d fixed bug where scaling policy return a random policy if many autoscale group have policies with same name. 2016-12-08 11:22:54 -05:00
Jan Brauer 31abdc7ace Add missing comma 2016-12-08 11:22:54 -05:00
Daekwon Kim a22bdd8356 Fix indent of "register" key 2016-12-08 11:22:54 -05:00
Daekwon Kim 4591761c73 Fix typo (volue -> volume) 2016-12-08 11:22:54 -05:00
Jaanus Torp 0f0cb9dc16 Added support for tagging images in ec2_ami.py 2016-12-08 11:22:53 -05:00
Kyle Johnson cf61778689 Fix typo in rds_subnet_group.py
aws_connection_kwargs should be aws_connect_kwargs
2016-12-08 11:22:53 -05:00
Jesse Rusak 9d93f052c2 Update rds module for RDS2 parameter name change.
boto's rds2 renamed `vpc_security_groups` to `vpc_security_group_ids`
and changed from a list of `VPCSecurityGroupMembership` to just a
list of ids. This accommodates that change when rds2 is being used.
2016-12-08 11:22:53 -05:00
steenzout 67f769d9a6 issue #994: use HAS_BOTO to determine if import was successful: - removed import of sys module. - HAS_BOTO constant to check if import was successful. - trigger a failure when import fails. - removed unnecessary imports. 2016-12-08 11:22:53 -05:00
Brian Coca 7985682c94 added support for postgres9.4 which is now available from amazon 2016-12-08 11:22:52 -05:00
Brian Coca 706db441b4 really fixed docs this time 2016-12-08 11:22:52 -05:00
Brian Coca 2dafff3f97 fixed doc issues on cloudformation 2016-12-08 11:22:52 -05:00
Rob Johnson d8af3f3b67 allow both template and template_url parameters 2016-12-08 11:22:52 -05:00
Mick Bass 5de4c053b6 clean rebase of https://github.com/ansible/ansible-modules-core/pull/1024 on a new branch 2016-12-08 11:22:51 -05:00
Brian Coca 4f7bc895d2 removed requirements/boto as it broke documentation as it is duplicated in shared aws fragements 2016-12-08 11:22:51 -05:00
Adam Chainz 21339664ce Make cloudformation module's template argument not required in case of stack deletion 2016-12-08 11:22:51 -05:00
Jonathan Davila de85294d2d allow boto profile use with s3 2016-12-08 11:22:51 -05:00
Lorin Hochstein 5224375a5a Use the correct alias syntax 2016-12-08 11:22:51 -05:00
Lorin Hochstein 17e6be671b ec2 module: add instance_id alias
Create an alias named instance_id for the instance_ids parameter.
2016-12-08 11:22:51 -05:00
Robert Estelle 268763995c ec2_group allow empty rules. 2016-12-08 11:22:51 -05:00
Kohei YOSHIDA f0db5c0cd0 support secure connection on fakes3 2016-12-08 11:22:51 -05:00
Scott Miller 751434de9d describe choices in alias documentation 2016-12-08 11:22:51 -05:00
Mick Bass 9980205edc Add support for AWS Security Token Service (temporary credentials) to all AWS cloud modules. 2016-12-08 11:22:51 -05:00
Toshio Kuratomi e710e46ff2 Make lack of boto call fail_json instead of sys.exit
Fixes #994
2016-12-08 11:22:51 -05:00
Brandon W Maister c1571928e5 Make cache_subnet_group default to empty security groups
Since they can't be specified together, it seems like setting the
default to no security groups is the right option.
2016-12-08 11:22:51 -05:00
Tom Wadley ad248376b1 use aws connect call in rds_subnet_group that allows boto profile use 2016-12-08 11:22:50 -05:00
Dan Abel 2250a95638 use simpler ec2_connect ec2 util call
This allows boto profile use
2016-12-08 11:22:50 -05:00
Mick Bass e9a0fad36b add retry with exponential backoff when we receive throttling error code from cloudformation 2016-12-08 11:22:50 -05:00
Brandon W Maister cffb2bdee9 Add `cache_subnet_group` to elasticache module
According to the [docs] cache subnet groups are required inside a VPC.

[docs]: http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheSubnetGroups.html
2016-12-08 11:22:50 -05:00
Brian Coca 7cd7bad2e8 added patch to workaround some s3 connection faliures 2016-12-08 11:22:50 -05:00
Brian Coca 252df8685a refactrored connection exception handling, added check to see if we actually get a connection before proceeding
Fixes #964
2016-12-08 11:22:50 -05:00
Sarah Zelechoski 17334b21ea fix syntax in last example 2016-12-08 11:22:50 -05:00
James Martin 57cf6e8bb4 Re-wording of feature. 2016-12-08 11:22:50 -05:00
Toshio Kuratomi e5149f3b30 Fix review comments from @bcoca in #745 2016-12-08 11:22:50 -05:00
Toshio Kuratomi 5378b5db98 Minor code formatting 2016-12-08 11:22:50 -05:00
Rowan Wookey 04fcfdad2c Fixed group name not being passed to wait_for_new_instances when replacing instances
Fixed group_name not being passed to wait_for_elb
Minor code clean up
2016-12-08 11:22:49 -05:00
moe bd09ebe5b4 Woops, make collect/delete loop more efficient. 2016-12-08 11:22:49 -05:00
moe 5e1e1a4dff Fixes #744.
The following cases work for me now:
- Create new ASG with tags
- Update tags on ASG (create/change/delete)

In short, the module should now work as expected
wrt tagging. The previous code did not work at all
with latest boto for me (serialization errors) and
the logic was buggy anyway; e.g. removed tags
would never get deleted from ec2.
2016-12-08 11:22:49 -05:00
James Martin cadfd56304 check lb for instance healthy and some refactoring of rolling replace functions.
Optionally waiting for new instances to be in viable state on ASG creation/update.

Properly updating properties and terminating group.
2016-12-08 11:22:49 -05:00
Julien Syx c676adde0b Fix the issue #931
Checking that the parameter doesn't exist. The old code had a bug when the parameter was 0.
2016-12-08 11:22:49 -05:00
Alex Rowley eeb867daf0 cloud/amazon/s3: update documentation
update description to show that module can do more than just put files into s3
2016-12-08 11:22:48 -05:00
Toshio Kuratomi c9b33d5de2 Fix for py2.6 (no dict comprehensions on py2.6) 2016-12-08 11:22:48 -05:00
Toshio Kuratomi c9cc8d0b70 Initialize the value of vpc_id variable 2016-12-08 11:22:48 -05:00
Toshio Kuratomi ba90eea165 Also don't fail if files are different and overwrite is false for uploads (this mimics copy and template).
Related to #489
2016-12-08 11:22:48 -05:00
Hagai Kariti 7d16ec283e Fix KeyError in public zones in route53 2016-12-08 11:22:48 -05:00
Toshio Kuratomi bba322a10e Sort subnets by the order they are specified in the play
Fixes #172
2016-12-08 11:22:47 -05:00
Bret Martin 650a7365f9 Allow vpc_subnet_id to remain unspecified (see bc0c169) 2016-12-08 11:22:47 -05:00
Matt Ferrante aaca9b5127 check keys is in dim2 before evaluating 2016-12-08 11:22:47 -05:00
Toshio Kuratomi 49511ea078 Small code cleanup 2016-12-08 11:22:46 -05:00
Brandon W Maister 2121bbc208 ec2: Apply all security groups at instance-creation
The code was picking out the first instance from the security groups
specified, even when multiple groups were specified. Now we use all of
them.
2016-12-08 11:22:46 -05:00
Michael Laccetti 8efb138fdc Moving the import to the top of the file and getting rid of the redundancy
I sure do wish I knew where the whitespace change was coming from, though. Frustrating.
2016-12-08 11:22:46 -05:00
Michael Laccetti 0bd25a9a38 Change s3 to use connect_to_region
* Allows us to use Ansible/s3 for GovCloud when accessing a pre-existing bucket
2016-12-08 11:22:46 -05:00
Peter Gehres 878ff1e929 Issue #489: s3 should not fail on checksum mismtach when overwrite=no 2016-12-08 11:22:46 -05:00
Feanil Patel a0caaf7f42 Compare DNS names case insensitively. 2016-12-08 11:22:45 -05:00
James Cammarata 7fd7cffb61 Updating version added fields for new alias parameters in route53 2016-12-08 11:22:45 -05:00
James Cammarata 657d9d1f25 Add private_zone parameter for route53
Fixes #473
2016-12-08 11:22:45 -05:00
Brian Coca 49c10e4359 now captures connection exceptions and returns in 'nicer' module failure 2016-12-08 11:22:44 -05:00
Coderah 0fbe26273d add alias support to route53 module 2016-12-08 11:22:44 -05:00
Coderah 40c41ed4ec add hosted_zone information to ec2_elb_lb return 2016-12-08 11:22:44 -05:00
Capi Etheriel 103caa2853 add ec2 instance tags and groups info 2016-12-08 11:22:44 -05:00
Joel Thompson 646657e325 Fixes issue 697 -- only purge the grants that need to be purged 2016-12-08 11:22:44 -05:00
Bret Martin ed3f1a133b ec2: make group only match group names in this VPC 2016-12-08 11:22:43 -05:00
Brian Coca 70856d5228 fix instance=None documentation 2016-12-08 11:22:43 -05:00
Brian Coca cd7f498755 Revert "Revert "Don't use 'tenancy' in ec2 spot requests"" 2016-12-08 11:22:43 -05:00
Brian Coca 6e55a0324b Revert "Don't use 'tenancy' in ec2 spot requests" 2016-12-08 11:22:43 -05:00
Doug Ellwanger cc6cc6e302 Pull SSL certificate IDs from existing ELBs 2016-12-08 11:22:42 -05:00
Luc Bourlier ae97d76a12 Don't use 'tenancy' in ec2 spot requests
The problem was introduced in commit f5789e8e. 'tenancy' is a parameter of
ec2.run_instances, but not in ec2.request_spot_instances. So it was breaking
the support for spot requests.
2016-12-08 11:22:41 -05:00
Jean-Baptiste Barth c0b2960892 Improve formatting after previous commit 2016-12-08 11:22:41 -05:00
Jean-Baptiste Barth 58ff9bece2 EC2: move logic about terminated instances up (#423)
As stated in #423, the commit 7f11c3d broke ec2 spot instance launching
after 1.7.2. This is because it acts on the 'res' variable which have 2
different types in the method, and in case we request spot instances,
the resulting object is not a result of ec2.run_instances() but
ec2.request_spot_instances(). Actually this fix doesn't seem to be
relevant in the spot instances case, because by construction we won't
retrieve 'terminated' instances in the end.
2016-12-08 11:22:40 -05:00
Brian Coca b853ad6c90 corrected version added for latest features 2016-12-08 11:22:40 -05:00
Brian Coca 83e0516478 minor fixes on new rds refactor 2016-12-08 11:22:40 -05:00
Brian Coca f90da6b2ba ec2 fix docs format 2016-12-08 11:22:39 -05:00
Brian Coca 1f1ebf248f updated tenancy version added 2016-12-08 11:22:39 -05:00
Alex Clifford 4097cbf317 ttl should always be used during a delete 2016-12-08 11:22:38 -05:00
Brian Coca 02a1cb62df corrected release when this feature was added 2016-12-08 11:22:38 -05:00
Toshio Kuratomi f3d41cdb06 Potential fix for 640 2016-12-08 11:22:38 -05:00
Alex Clifford d4c4dd31d8 Fix slight typo in doco 2016-12-08 11:22:37 -05:00
James Martin 07dbc333b2 vpc_zone_identifier must be a csv string when an asg is updated. 2016-12-08 11:22:37 -05:00
Philip Misiowiec f3abfa0f19 Adds tenancy state to returning json 2016-12-08 11:22:37 -05:00
Luís Guilherme F. Pereira b347875de0 Allow ec2_lc to create EC2-Classic Launch Configs
Removes default value from ec2_lc so it can create launch configurations valid on a EC2-Classic environment. AWS API will not accept a assign_public_ip when creating an ASG outside of VPC.
2016-12-08 11:22:36 -05:00
Philip Misiowiec c57c1ea419 added version 2016-12-08 11:22:35 -05:00
Phillip Holmes 0d3b144eb2 Route53 fix - forcing zone_in, record_in to lower case
Fixed the .tolower to .lower() for correct syntax (copied change from older notes).
2016-12-08 11:22:35 -05:00
Philip Misiowiec 23668e41b0 Support for EC2 dedicated tenancy option 2016-12-08 11:22:35 -05:00
Philip Misiowiec d30881a461 Ability to detach an EBS volume from an EC2 instance 2016-12-08 11:22:35 -05:00
Brian Coca 945909bf67 update to use connect_to_region to avoid errors with china 2016-12-08 11:22:34 -05:00
Will Thames 834c8d2f59 Added better region handling and enabled eu-central-1
Make use of improved connect_to_aws that throws an exception
if a region can't be connected to (e.g. eu-central-1 requires
boto 2.34 onwards)

Add eu-central-1 to the two modules that hardcode their regions
Add us-gov-west-1 to ec2_ami_search to match documentation!
This pull request makes use of the changes in ansible/ansible#9419
2016-12-08 11:22:33 -05:00
Kale Franz 7c8f0b99af #531 correction
correct list comprehension for older versions of python (back to python 2.4)
2016-12-08 11:22:33 -05:00
Kale Franz eac743dc39 fixes #529 ec2_group module bug 2016-12-08 11:22:33 -05:00
Jeff Gonzalez 8eedd915cd Fixed formatting in documentation
The example was using mixed shorthand and long form yaml (region: "us-east-1 disable_rollback=true"

I modified the entire example to be long form.
2016-12-08 11:22:33 -05:00
Mike Putnam d2d0ffd83a Type fix on delete_snapshot docs. 2016-12-08 11:22:32 -05:00
Harald Skoglund 1a8b9b8935 add support for stack policies in cloudformation 2016-12-08 11:22:32 -05:00
Mike Putnam 1de5248a0a Clarify possible variable value in the docs. 2016-12-08 11:22:32 -05:00
Marcus Ahle a71b1b7385 Preventing Nonetype is not iterable error when no tags are passed in for a newly created ASG 2016-12-08 11:22:31 -05:00
Ben Whaley 6609ebde27 vpc_zone_identifier should be a list as per the docs 2016-12-08 11:22:31 -05:00
Scott Miller c49a20b0e5 fix documentation
AWS does not recognize the subnet if it is presented in a comma delimited format with spaces. you must remove the space for Amazon to recognize the second subnet.
2016-12-08 11:22:31 -05:00
Toshio Kuratomi cd7cc07e85 Gixes to doc formatting 2016-12-08 11:22:31 -05:00
Steve Fox 7af1c96623 retry_interval needs to be a float before passing to time.sleep 2016-12-08 11:22:31 -05:00
Philip Misiowiec 3f4d412bff Ability to specify new SSD EBS option 2016-12-08 11:22:30 -05:00
Will Thames 63656e5ef7 Fixed tagging 2016-12-08 11:22:30 -05:00
Denver Janke 61cfccff1c Fix few bugs around renaming db instances. 2016-12-08 11:22:30 -05:00
Will Thames daac0e3a3e Improved error handling
More tests, particular for failure testing
2016-12-08 11:22:30 -05:00
Will Thames 22a3b3f811 RDS rewrite to use boto.rds and boto.rds2
Using rds2 allows tags and the control over whether or not DBs are
publicly accessible.
Move RDS towards a pair of interfaces implementing the details of rds
and rds2
Added tests to ensure that all operations work correctly as well as
requirements files that allow virtualenvs to test either boto.rds or
boto.rds2
2016-12-08 11:22:29 -05:00
willthames ef88ff6dd8 Added the ability to remove snapshots
Added state option, and accompanying snapshot_id option for
when state=absent.
2016-12-08 11:22:29 -05:00
Michael DeHaan f875cc5197 Remove potentially out of date or specific product references. 2016-12-08 11:22:29 -05:00
Michael DeHaan 76efaa6cfb More EC2 doc tweaks 2016-12-08 11:22:29 -05:00
Michael DeHaan 590d20db24 Misc EC2 doc tweaks. 2016-12-08 11:22:29 -05:00
follower 4889701874 Fix typo of "rules_egress"
Or is "rules_egree" supposed to be a plural? The sentence is difficult to parse.

Maybe the correct fix is to "Purge existing rules on security group that are not found in rules_egress"?
2016-12-08 11:22:28 -05:00
Robert Estelle 4e2d05b1f3 Remove incorrect executable permissions. 2016-12-08 11:22:26 -05:00
James Martin dd46f7275f asg will now be terminated if state=absent.
adds mutually exclusive options
2016-12-08 11:22:26 -05:00
James Cammarata e9fbb5f1b6 Serialize tag attributes to ASG properties in ec2_asg
Fixes #108
2016-12-08 11:22:26 -05:00
James Martin f59a1348ad Removes orphaned code. 2016-12-08 11:22:26 -05:00
James Martin 17cd9d18b0 fixes #240, #274, #108 2016-12-08 11:22:26 -05:00
José Moreira 82450c6811 Fixed small typo on ec2 task name 2016-12-08 11:22:25 -05:00
Brian Coca 5a467bc72c added __init__.py to new cloud subcategories so builds work again 2016-12-08 11:22:25 -05:00
Brian Coca 32e85c0944 made subcategories for cloud modules for better organization 2016-12-08 11:22:24 -05:00