Commit graph

2799 commits

Author SHA1 Message Date
Tom Melendez
922aed148d Support for GCE Managed Instance Groups. (#4541)
Create, Delete, Resize and Recreate (of instances) supported.  Autoscalers are also supported.
2016-09-16 17:10:26 -04:00
Ryan S. Brown
a435dbbb2d Fix version_added for ec2_asg feature 2016-09-16 16:17:42 -04:00
Shawn Siefkas
a29fb59a72 Adding SNS notification support to ec2_asg module
Addresses #1844
2016-09-16 16:13:54 -04:00
Ryan Brown
2e1e3562b9 Stop sorting of termination_policies in ec2_asg (#4883)
The AWS API requires that any termination policy list that includes
`Default` must end with Default. The attribute sorting caused any list
of attributes to be lexically sorted, so a list like
`["OldestLaunchConfiguration", "Default"]` would be changed to
`["Default", "OldestLaunchConfiguration"]` because default is earlier
alphabetically. This caused calls to fail with BotoServerError per #4069

This commit also adds proper tracebacks to all botoservererror fail_json
calls.

Closes #4069
2016-09-16 10:59:31 -04:00
Tom Melendez
e92db1dc12 Document ability to disable external IP with 'none' setting. Closes #2562. (#4878) 2016-09-15 17:29:25 -04:00
Monty Taylor
4840d30589 Expose the reuse_fips flag on os_server (#4849)
* Expose the reuse_fips flag on os_server

* Remove useless line
2016-09-15 16:07:34 -04:00
mzizzi
48d932643b cloudformation stack events itertools.imap bugfix (#4868) 2016-09-15 12:55:28 -04:00
Christopher Kotfila
2632aa630f Unpack AWS reservations while waiting to terminate (#4012)
Previously calculation of the number of instances that have been
terminated assumed all instances were in the first reservation returned
by AWS.  If this is not the case the calculated number of instances
terminated never reaches the number of instances and the module always
times out. By unpacking the instances we get an accurate number and the
module correctly exits.
2016-09-13 15:07:14 -04:00
Ryan Brown
ae6992bf8c Handle EC2 instances with multiple network interfaces (#4766)
Currently instances with multiple ENI's can't be started or stopped
because sourceDestCheck is a per-interface attribute, but we use the
boto global access to it (which only works when there's a single ENI).

This patch handles multiple ENI's and applies the sourcedestcheck across
all interfaces the same way.

Fixes #3234
2016-09-12 18:26:13 -04:00
Chris Houseknecht
de0122fdaf
Set default log_driver to None to prevent config comparison when a log_driver is not specified. Fixes #4600. 2016-09-10 01:31:36 -04:00
Chris Houseknecht
0d43a01462 Purge networks using network name rather than ID. Fixes 4596. 2016-09-10 00:51:21 -04:00
Chris Houseknecht
cac4e68090
Default restart_retries to None rather than 0. Fixes #4534. 2016-09-09 22:20:56 -04:00
Ryan Brown
819fe45864 Fix failure when powering on/off EC2 instances by tag only. (#4767)
If you apply `wait=yes` and use `instance_tags` as your filter for
stopping/starting EC2 instances, this stack trace happens:

```
An exception occurred during task execution. The full traceback is:                                                                          │~
Traceback (most recent call last):                                                                                                           │~
  File "/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py", line 1540, in <module>                                                            │~
    main()                                                                                                                                   │~
  File "/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py", line 1514, in main                                                                │~
    (changed, instance_dict_array, new_instance_ids) = startstop_instances(module, ec2, instance_ids, state, instance_tags)                  │~
  File "/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py", line 1343, in startstop_instances                                                 │~
    if len(matched_instances) < len(instance_ids):                                                                                           │~
TypeError: object of type 'NoneType' has no len()                                                                                            │~
                                                                                                                                             │~
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "ec2"}, "module_stderr": "Traceb│~
ack (most recent call last):\n  File \"/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py\", line 1540, in <module>\n    main()\n  File \"/tmp/│~
ryansb/ansible_FwE8VR/ansible_module_ec2.py\", line 1514, in main\n    (changed, instance_dict_array, new_instance_ids) = startstop_instances│~
(module, ec2, instance_ids, state, instance_tags)\n  File \"/tmp/ryansb/ansible_FwE8VR/ansible_module_ec2.py\", line 1343, in startstop_insta│~
nces\n    if len(matched_instances) < len(instance_ids):\nTypeError: object of type 'NoneType' has no len()\n", "module_stdout": "", "msg": "│~
MODULE FAILURE", "parsed": false}
```

That's because the `instance_ids` variable is None if not supplied
in the task. That means the instances that result from the instance_tags
query aren't going to be included in the wait loop. To fix this, a list
needs to be kept of instances with matching tags and that list needs to
be added to `instance_ids` before the wait loop.
2016-09-09 19:38:05 -04:00
Abhijit Menon-Sen
55d51b3946 Fix spot instance creation by ignoring instance_initiated_shutdown_behavior (#4741)
Before this, all spot instance requests would fail because the code
_always_ called module.fail_json when the parameter was set (which it
always was, because the module parameter's default was set to 'stop').

As the comment said, this parameter doesn't make sense for spot
instances at all, so the error message was also misleading.
2016-09-08 12:33:36 -04:00
Florian Dambrine
aac55fcc62 Fix ec2 module source_dest_check when running on non VPC instances (EC2 Classic) (#3243) 2016-09-08 12:25:17 +02:00
Matt Ferrante
624f813f60 Properly support tag updates on CloudFormation stack-update actions (#3638) 2016-09-07 16:16:32 -04:00
David J Peacock
3bede24323 description expanded for 112, AKA VRRP protocol) (#4645)
* description expanded for 112, AKA VRRP protocol)

* corrected syntax for description for IP protocols
2016-09-07 12:30:03 -04:00
Kenny Woodson
269c06a4c9 Fix for validate rule. Ensure rule is a dict. (#4640) 2016-09-02 15:09:58 -04:00
Kenny Woodson
9b37dcb593 Getting rid of a None type error when no resource tags are defined. (#4638) 2016-09-02 11:54:27 -07:00
John R Barker
0c25e968ee digital_ocean_tag name is a required field
Spotted during final review of https://github.com/ansible/ansible-modules-core/pull/4218/files
Simple to change, so fixing post merge
2016-08-30 19:56:49 +01:00
Victor Volle
c170107eef Digitalocean tags (replaces #4209) (#4218)
* Fixes #4117: Add DigitalOcean Tag support

* Add GPLv3 license header and RETURN documentation

* ansible.module_utils.urls instead of "requests"
2016-08-30 19:54:46 +01:00
Arun prasath
0d98760b49 Fixes bug #4546 - Made password optional (#4574) 2016-08-30 11:16:43 -04:00
David J Peacock
8f963a7028 Fix #4412: os_security_group_rule support numbered protocols (#4444) 2016-08-30 10:55:16 -04:00
Ryan Brown
0c37949941 Remove spurious changed state on iam_policy module (#4381)
Due to a mixup of the group/role/user and policy names, policies with
the same name as the group/role/user they are attached to would never be
updated after creation. To fix that, we needed two changes to the logic
of policy comparison:

- Compare the new policy name to *all* matching policies, not just the
  first in lexicographical order
- Compare the new policy name to the matching ones, not to the IAM
  object the policy is attached to
2016-08-30 10:24:00 -04:00
Rick Mendes
02c47f5b0c Fixes #3144 (#4305) 2016-08-30 15:16:42 +02:00
Matías Pizarro
521c9a2e20 Use named parameters in new_droplet method call (#4483)
This mirrors the original method signature and guards against any
change in order parameter
2016-08-30 11:56:09 +02:00
Ilja Bauer
acb7d873f8 Replaced use of bare variables with full variable syntax (#4149) 2016-08-27 17:11:42 +02:00
chouseknecht
48941291c1
Fix container labels expected vs actual comparison. 2016-08-27 08:00:13 -04:00
Patrick Marques
f3c0c09fb6 ssh_public_keys on Azure virtual machine is a list (#4350)
The ssh_public_keys must be a list otherwise will give the error:
"argument ssh_public_keys is of type <type 'dict'> and we were unable to convert to list"
2016-08-25 15:08:54 -07:00
Richard Adams
c8ca1a6211 Add parameter to ec2 module to control instance shutdown behavior (stop|terminate) 2016-08-24 13:34:48 -04:00
Karthik Suresh
64ded1bb5e Removing duplicate name: parameter possible typo (#4525)
Removed name:parameter in documentation. Possible typo.
2016-08-24 11:04:59 -04:00
chouseknecht
42540ae510 Fix doc strings. Use of > was breaking HTML generation on docs site module page. 2016-08-23 16:17:56 -04:00
nishiokay
a24398d025 Add ipv6 paramater to digital_ocean module (#4447) 2016-08-19 09:07:47 +02:00
Linus Arver
74c8954d86 docker_service: fix files/project_files typo
The original decision to rename from `project_files' to `files' was in
3a5dd00076.
2016-08-17 14:50:27 -07:00
chouseknecht
95f69c55fa Exposing tcp and udp for same port fails. Fixes issue #4354. 2016-08-17 17:03:37 -04:00
Ryan Brown
8da5e2cb88 Merge pull request #4275 from shaunbrady/ec2_elb_lb_respect_vpc
Make ec2_elb_lb respect VPCs when resolving groups
2016-08-17 14:06:25 -04:00
PikachuEXE
997fa3b2b7 Allow specifying human readable value for option memory_limit again (#4049) 2016-08-16 08:44:24 -04:00
Ryan Brown
a2a6b5247f Merge pull request #4286 from rickmendes/fix-issue-4227
Clarify docs that led to #4227
2016-08-15 12:27:01 -04:00
chouseknecht
e7abbbf134 Fix network alias and network link comparison.
- Using set based comparison was not working consistently
  - With != operator worked locally but consistently failed on Travis
  - With 'not in' operator failed locally and on Travis
2016-08-12 18:01:11 -04:00
chouseknecht
4c3bf24ebf
If debug true, include actions and differences in output. 2016-08-12 12:14:34 -04:00
Chris Houseknecht
70806fcfe4 Some post merge clean up: (#4406)
- Removed required_if.
  - Fixed doc strings.
  - Removed debug output being appended to actions.
  - Put import of basics at bottom to be consistent with other docker modules
  - Added 'containers' alias to 'connected' param
  - Put facts in ansible_facts.ansible_docker_network
2016-08-12 10:40:46 -04:00
Brian Coca
decb2ec9fa doc fix 2016-08-12 09:53:57 -04:00
Chris Houseknecht
fdfdfe9017 Adding docker_network module. (#4404) 2016-08-12 09:52:37 -04:00
muxator
24fa1ab426 typo in the documentation of the "state" parameter (#4353) 2016-08-07 17:23:42 +02:00
Chris Houseknecht
0358dee095 Add buildargs parameter to support Dockerfile ARG directive. (#4349)
* Add buildargs parameter to support Dockerfile ARG directive.

* Fix doc_strings. Doc string for load_path was completely missing.
2016-08-05 19:14:31 -04:00
chouseknecht
cc101164a8
Default repository tag value to tag parameter value or 'latest'. 2016-08-05 16:08:11 -04:00
chouseknecht
d36f04e7f2 Always returns changed when state present and name includes :tag. 2016-08-05 14:29:06 -04:00
Chris Houseknecht
c0d373f258 Add *build* to state parameter choices. Updated deprecation message. Will be deprecated in release 2.3. Removed (#4342)
mention of *tagged* state in the force parameter doc strings. There is no *tagged* state.
2016-08-05 10:47:29 -04:00
chouseknecht
c27054090a Fix image tag operation. Allows repository in form of repo:tag. If no tag value, defaults to 'latest'. 2016-08-05 05:08:52 -04:00
Ryan Brown
95a7ee271a Merge pull request #3773 from jbaublitz/gce_net_nwmode
gce_net: Add ability to create new-style networks on Google Cloud
2016-08-04 14:22:35 -04:00