Commit Graph

182 Commits (b46a1ff3e167ff43ba3c6239a39f2aeca6e5af4b)

Author SHA1 Message Date
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