Commit Graph

611 Commits (1609afbd12abb68d1434ee5ce56fe09e12a53fdb)

Author SHA1 Message Date
jjshoe 706bdbf284 Catch the rare condition where ami creation failed, this is critical when you have a 10-15 minute wait on ami creation. This rarely happens, and is tough to reproduce, but it does happen. (#5106) 2016-12-08 11:25:19 -05:00
Elena Washington 91e433594a Make is so that the params param truly isn't required (fix for #3860) 2016-12-08 11:25:19 -05:00
Ryan Brown b091d39baf Handle termination_protection parameter when restarting instances (#5076)
* Restart EC2 instances with multiple network interfaces

A previous bug, #3234, caused instances with multiple ENI's to fail when being
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 a variant of that bug that only surfaced when restarting an
instance, and catches the same type of exception.

* Default termination_protection to None instead of False

AWS defaults the value of termination_protection to False, so we don't
need to explicitly send `False` when the user hasn't specified a
termination protection level. Before this patch, the below pair of tasks
would:

1. Create an instance (enabling termination_protection)
2. Restart that instance (disabling termination_protection)

Now, the default None value would prevent the restart task from
disabling termination_protection.

```
- name: make an EC2 instance
  ec2:
    vpc_subnet_id: {{ subnet  }}
    instance_type: t2.micro
    termination_protection: yes
    exact_count: 1
    count_tag:
       Name: TestInstance
    instance_tags:
       Name: TestInstance
    group_id: {{ group }}
    image: ami-7172b611
    wait: yes
- name: restart a protected EC2 instance
  ec2:
    vpc_subnet_id: {{ subnet  }}
    state: restarted
    instance_tags:
       Name: TestInstance
    group_id: {{ group }}
    image: ami-7172b611
    wait: yes
```
2016-12-08 11:25:18 -05:00
Pradeep b405931e8b Typo Fix 2016-12-08 11:25:18 -05:00
Ryan Brown 135b92bf4e Check status of finished spot instance requests (#4990)
Per #3877, the code to wait for spot instance requests to finish would
hang for the full wait time if any spot request failed for any reason.
This commit introduces status checks for spot requests, so if the
request fails, finishes, or is cancelled the task will fail/succeed
accordingly.

One edge case introduced here is tha if a user terminates the instance
associated with the request manually it won't fail the play, under the
presumption that the user *wants* the instance terminated.
2016-12-08 11:25:15 -05:00
Denis Tiago c0c5b9a50a fix health instances count when we have more than one lb in asg 2016-12-08 11:25:13 -05:00
Ryan S. Brown 93737f819a Accept JSON type as the content of policy_json parameter on `iam_policy` module 2016-12-08 11:25:12 -05:00
René Moser cb9ec9f802 iam_cert: remove choice list for dup_ok type bool (#4940)
See 8879931f0cd727244587b6e58a7279d9125c96a2
2016-12-08 11:25:12 -05:00
Ryan S. Brown 10e0ec84fb Fix version_added for ec2_asg feature 2016-12-08 11:25:09 -05:00
Shawn Siefkas cff256b057 Adding SNS notification support to ec2_asg module
Addresses #1844
2016-12-08 11:25:07 -05:00
Ryan Brown 6dff21bd42 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-12-08 11:25:06 -05:00
mzizzi eaef333215 cloudformation stack events itertools.imap bugfix (#4868) 2016-12-08 11:25:05 -05:00
Christopher Kotfila f916dae700 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-12-08 11:25:05 -05:00
Ryan Brown 1a02005b8d 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-12-08 11:25:05 -05:00
Ryan Brown 6ae4e50e47 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-12-08 11:25:03 -05:00
Abhijit Menon-Sen 841ceb808d 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-12-08 11:25:02 -05:00
Florian Dambrine 2adc325ef6 Fix ec2 module source_dest_check when running on non VPC instances (EC2 Classic) (#3243) 2016-12-08 11:25:02 -05:00
Matt Ferrante d88f5f6808 Properly support tag updates on CloudFormation stack-update actions (#3638) 2016-12-08 11:25:02 -05:00
Kenny Woodson 3cb42fc5dd Fix for validate rule. Ensure rule is a dict. (#4640) 2016-12-08 11:24:59 -05:00
Kenny Woodson f1db594e9f Getting rid of a None type error when no resource tags are defined. (#4638) 2016-12-08 11:24:59 -05:00
Ryan Brown c85d854c84 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-12-08 11:24:55 -05:00
Rick Mendes 503c2b6158 Fixes #3144 (#4305) 2016-12-08 11:24:55 -05:00
Ilja Bauer 729486809e Replaced use of bare variables with full variable syntax (#4149) 2016-12-08 11:24:54 -05:00
Richard Adams b0135fadea Add parameter to `ec2` module to control instance shutdown behavior (stop|terminate) 2016-12-08 11:24:52 -05:00
Shawn Siefkas e9bf046c26 Check mode fixes for ec2_vpc_net module (#2179)
* Check mode fixes for ec2_vpc_net module

Returns VPC object information

Detects state change for VPC, DHCP options, and tags in check mode

* Early exit on VPC creation in check mode
2016-12-08 11:24:47 -05:00
Shawn Siefkas 0b95051039 Fix #2526 (#2527)
Fail on unhandled exception in ec2_asg rather than raise
2016-12-08 11:24:47 -05:00
Shawn Siefkas 66f1f6d537 Check mode fix for ec2_group module (#2184)
The default VPC egress rules was being left in the egress rules for
purging in check mode.  This ensures that the module returns the correct
change state during check mode.
2016-12-08 11:24:47 -05:00
Rick Mendes be33879152 Fixes #4227: just changing messaging 2016-12-08 11:24:46 -05:00
Rick Mendes eae75cf727 Fix #3549, failure to reference `module` in `ec2_eip` module 2016-12-08 11:24:46 -05:00
Lyle Mantooth f57ece661f Remove file extension from policy names (#3805)
Fixes #3804.

Prevents `__file__` from contributing ".", which is an illegal character in ELB policy names.
2016-12-08 11:24:46 -05:00
Rick Mendes 4fad93561a please remove me as maintainer 2016-12-08 11:24:46 -05:00
Rick Mendes d6cc007380 Fixes #4227 2016-12-08 11:24:46 -05:00
Jasmine Hegman f5c3f4dd6b Update docs to indicate ec2_asg state defaults to present (#4046)
* Update docs to indicate ec2_asg state defaults to present

Hopefully fixes Issue #4016

* Forgot to flip required to false
2016-12-08 11:24:46 -05:00
Shaun Brady 7b8d625546 Make ec2_elb_lb respect VPCs when resolving groups
AWS security groups are unique by name only by VPC (Restated, the VPC
and group name form a unique key).

When attaching security groups to an ELB, the ec2_elb_lb module would
erroneously find security groups of the same name in other VPCs thus
causing an error stating as such.

To eliminate the error, we check that we are attaching subnets (implying
that we are in a VPC), grab the vpc_id of the 0th subnet, and filtering
the list of security groups on this VPC.  In other cases, no such filter
is applied (filters=None).
2016-12-08 11:24:46 -05:00
Shaun Brady 3b32b60338 Remove trailing white space 2016-12-08 11:24:46 -05:00
Shaun Brady 04199140c5 Make group_name resolution VPC aware
EC2 Security Group names are unique given a VPC.  When a group_name
value is specified in a rule, if the group_name does not exist in the
provided vpc_id it should create the group as per the documentation.

The groups dictionary uses group_names as keys, so it is possible to
find a group in another VPC with the name that is desired.  This causes
an error as the security group being acted on, and the security group
referenced in the rule are in two different VPCs.

To prevent this issue, we check to see if vpc_id is defined and if so
check that VPCs match, else we treat the group as new.
2016-12-08 11:24:46 -05:00
chrisweaver 531954e2f6 Enforce boolean type for dup_ok
Stop "choices" from being interpreted as strings.
2016-12-08 11:24:45 -05:00
Matthew Martin 4d952d6e6e Add CAPABILITY_NAMED_IAM to cloudformation capabilities
While from the documentation[1] one would assume that replacing
CAPABILITY_IAM with CAPABILITY_NAMED_IAM; this as empirically been shown
to not be the case.

1: "If you have IAM resources, you can specify either capability. If you
have IAM resources with custom names, you must specify
CAPABILITY_NAMED_IAM."
http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html
2016-12-08 11:24:45 -05:00
Michael Baydoun 3818cc2b95 fixes issues where iam_policy incorrected reported changed 2016-12-08 11:24:45 -05:00
Kai Kousa 4a8a052e2e Improve documentation on security_groups-option 2016-12-08 11:24:44 -05:00
Adrian Moisey 28716f565c Add default port for aurora (#4102)
If a port isn't specified, it's looked up. The lookup breaks without
this.

Related: https://github.com/ansible/ansible-modules-core/pull/3414
2016-12-08 11:24:42 -05:00
Ryan Brown d4cec5ccc1 Remove double-assignment of EC2 parameters (#4081)
The `source_dest_check` and `termination_protection` variables are being
assigned twice in ec2.py, likely due to an incorrect merge somewhere
along the line.
2016-12-08 11:24:40 -05:00
Hrishikesh Barua cf9bfc3459 Fix for #16518 - added missing regions 2016-12-08 11:24:40 -05:00
Ryan S. Brown a2e6ac6ca8 IAM group modules need `module` passed
The IAM group modules were not receiving the `module` object, but they
use `module.fail_json()` in their exception handlers. This patch passes
through the module object so the real errors from boto are exposed,
rather than errors about "NoneType has no method `fail_json`".
2016-12-08 11:24:39 -05:00
Javier M. Mellid 49f9404cd2 Add s3_url requirement in doc when rgw support is enabled in s3.py
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
2016-12-08 11:24:38 -05:00
Javier M. Mellid 6346cad9d0 Add proper version_added for rgw option in s3.py
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
2016-12-08 11:24:38 -05:00
Javier M. Mellid 0b156aae16 Add Ceph RGW S3 compatibility
Ceph Object Gateway (Ceph RGW) is an object storage interface built on top of
librados to provide applications with a RESTful gateway to Ceph Storage
Clusters:

http://docs.ceph.com/docs/master/radosgw/

This patch adds the required bits to use the RGW S3 RESTful API properly.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
2016-12-08 11:24:38 -05:00
Adam Butler 0c7ec1e860 Fixes incorrect key name protocols -> protocol (#3963) 2016-12-08 11:24:38 -05:00
Toshio Kuratomi 53a22ce93a Finish python3 syntax compilation fixing for core repo 2016-12-08 11:24:37 -05:00
Bradley Phipps 17985f9917 added missing colons to documentation (#3913) 2016-12-08 11:24:36 -05:00
Matt Davis 81e7720f62 Iam trust policy (#3885)
* added support for trust policies

* added version_added to new params in DOC string

* update version_added on new iam args to 2.2
2016-12-08 11:24:36 -05:00
mansunkuo be6ce922a6 Add an example to delete Route53 alias record set (#3834) 2016-12-08 11:24:35 -05:00
Elena Washington cf31b4d8b5 Add support for PostgreSQL 9.5 in rds_param_group (fix for #3846) 2016-12-08 11:24:35 -05:00
Jonathan A. Sternberg 97917121a6 Paginate the results from `boto.iam`
The default pagination is every 100 items with a maximum of 1000 from
Amazon. This properly uses the marker returned by Amazon to concatenate
the various pages from the results.

This fixes #2440.
2016-12-08 11:24:34 -05:00
Michael Pappas 585003c546 Prevent ec2group from deleting sgs during check_mode runs 2016-12-08 11:24:34 -05:00
@ 3fa745eef9 Fixing error exception handling for python3. Does not need to be compa… (#3840)
* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing compile time errors IRT error exception handling for Python 3.5.
This does not need to be compatible with Python2.4 b/c Boto is Python 2.6 and above.
2016-12-08 11:24:34 -05:00
@ 1573066ec1 Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above. (#3839) 2016-12-08 11:24:33 -05:00
David Fischer adec050165 Add MariaDB to valid RDS engines (#3337)
* Add MariaDB to valid RDS engines

* Update RDS module documentation
2016-12-08 11:24:32 -05:00
Roberto Bampi 375884464e Add an example for SRV record in route53 (#3749) 2016-12-08 11:24:31 -05:00
Doug Luce 9167abdd10 Fix S3 unavailable region error
This is to address this error:

  fatal: [site]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to connect to S3: Region  does not seem to be available for awsmodule boto.s3. If the region definitely exists, you may need to upgrade boto or extend with endpoints_path"}

Commit 0dd58e9 changed the logic so an exception is thrown (by
`connect_to_aws`) before the `s3 is None` check is performed. This
changes the `None` check to a catch so the old logic can compensate.
2016-12-08 11:24:30 -05:00
Kenny Woodson cd09aab9b4 Unindenting the delete to user (#3147) 2016-12-08 11:24:30 -05:00
Ryan Brown 962a446238 Allow users to pick AWS Aurora as an RDS engine (#3414)
Per the [RDS docs](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html),
add `aurora` as a valid DB engine.
2016-12-08 11:24:30 -05:00
Nathan Brown c053fa5378 Do not expect the elb to have policies or instances. Fixes #3593 (#3595) 2016-12-08 11:24:30 -05:00
kwerey 963cb64337 Add option to make RDS param groups for the MySQL 5.7 engine family. (#3695) 2016-12-08 11:24:30 -05:00
Lloyd Hazlett 20e86d1062 Add path type to argument_spec where applicable (#3040) 2016-12-08 11:24:30 -05:00
Kaz Cheng ff1c591c3e Allow create_iam_role to return an additional value of role_result and (#2418)
instance_profile_result, in addition to the existing role list and change value
2016-12-08 11:24:29 -05:00
hyperized 82cefd7ce1 Added restart functionality to ec2.py 2016-12-08 11:24:26 -05:00
John R Barker d13046a905 ansible-validate-modules part 4: Enable check on ansible-modules-core (#3526)
* Call ansible-validate-modules

* Correct quotes + add newline
2016-12-08 11:24:26 -05:00
cspollar 7dc0dcc59e Add missing periods to description items.
Current theme used by docs.ansible.com displays description items on one line. Adding periods helps readability.
2016-12-08 11:24:25 -05:00
Brian Coca fdcc1fe763 clarified docs on overwrite 2016-12-08 11:24:25 -05:00
Ryan Brown 52edeeca4c Fix capitalization of AWS in ec2_lc module documentation 2016-12-08 11:24:24 -05:00
Bill W 0fcc2d8973 Add more example on how to use module ec2_tags to list tags on an ins… (#3530)
* Add more example on how to use module ec2_tags to list tags on an instance

* Add more example on how to use module ec2_tags to list tags on an instance
2016-12-08 11:24:24 -05:00
deyvsh 3775d8e684 Extend example to demonstrate usage of ephemeral disks. (#3550) 2016-12-08 11:24:24 -05:00
Sumit Roy b8204774dd Support tagging ELBs using boto 2.0. (#2844) 2016-12-08 11:24:20 -05:00
Brian Coca 4e08f94a34 corrected return docs sample 2016-12-08 11:24:20 -05:00
Constantin 404f07af8e Added improvements and documented return structure (#2320) 2016-12-08 11:24:19 -05:00
jjshoe 87946920d8 Fix an issue where by a call to ec2.get_image wasn't wrapped in a try/except, and would occasionally throw an exception in the wild. Also greatly simplifies two of the ugliest known loops to man down into a single loop. (#2554) 2016-12-08 11:24:19 -05:00
Dennis Conrad 70b0891f95 Fix UnboundLocalError if 'access_key_ids' not supplied
'key_ids' is referenced before it is assigned, causing the module to fail with a UnboundLocalError instead of failing gracefully with a helpful error message.  This very small patch moves the assignment of 'key_ids' to before the variable is referenced.
2016-12-08 11:24:19 -05:00
Marcin c3ebc84689 rebase for #2477, ready_for_review (#2581) 2016-12-08 11:24:18 -05:00
Joel Thompson 1db444cdc2 Add exponential backoff retries to ec2_elb_lb (#3379)
ec2_elb_lb doesn't react well to AWS API throttling errors. This
implements an exponential backoff operation around some of the AWS API
calls (with random jitter, in line with AWS recommendations) to make
this more resilient.
2016-12-08 11:24:18 -05:00
Michael Moussa 0494dced3a Fixes read replica create BC break (#3365) 2016-12-08 11:24:17 -05:00
William Holroyd 42d784c24b Added ap-northeast-2 region (#2849) 2016-12-08 11:24:17 -05:00
Rob 5a48a2e93e Fix to ensure youngest snapshot is retrieved rather than oldest (#3115) 2016-12-08 11:24:17 -05:00
jjshoe 5b8d209b7e Speed up AMI code by not attempting to create the AMI without checkin… (#2551)
* Speed up AMI code by not attempting to create the AMI without checking on the name first. Also simplifies code for reporting errors from AMI creation, greatly.

* remove sys.exit
2016-12-08 11:24:17 -05:00
Marcin ea57d8b005 Check if identifier is specified for geo,weighted or failover routing. Don't fail if record set already exist. Set choices for failover - capital PRIMARY and SECONDARY. (#2470) 2016-12-08 11:24:17 -05:00
Kalle Lehtonen 02f737cdee Fix and add more error handling for role policies
In case role policy was deleted, we did not handle at all if there

was authorization issue to do the deletion. Also add message when

role is not found and the policy is skipped.
2016-12-08 11:24:16 -05:00
Brian Coca ff755da1e5 fixed doc quoting 2016-12-08 11:24:15 -05:00
Brian Coca 37513ca8bb corrected required docs as only boolean is allowed
these complex values were not displayed and would always show the fields as requried
2016-12-08 11:24:15 -05:00
Christian Aistleitner 51e3c6c49b Guard against too old boto library
route53 creates Record objects using `health check` and `failover`
parameters. Those parameters only became available in boto 2.28.0.
As some prominent LTS Linux releases (e.g.: Ubuntu 14.04) only ship
older boto versions (e.g.: 2.20.1 for Ubuntu 14.04), users are getting
unhelpful error messages like

  TypeError: __init__() got an unexpected keyword argument 'health_check'

when running Ansible 2 against their LTS install's default boto.
We improve upon this error message by checking the boto version
beforehand.

Fixes ansible/ansible#13646
2016-12-08 11:24:14 -05:00
Arnaud Lachaume 50622b4e6a fix aws elasticache idempotency 2016-12-08 11:24:14 -05:00
whiter dadf835a06 Remove access_key and secret_key as these are provided by aws doc fragment Remove ec2 doc fragment as region is not required for IAM 2016-12-08 11:24:14 -05:00
Ashwanth Kumar 7c5b4b142a Doing exponential backoff on route53 upon AWS throttling 2016-12-08 11:24:14 -05:00
Brian Coca d035961d1c added version added 2016-12-08 11:24:13 -05:00
Ted Timmons 8c6741b2bb fix typo in documentation
let's -> lets
2016-12-08 11:24:13 -05:00
Taras Lipatov b5fb47e28e Fixed typo json_fail to fail_json 2016-12-08 11:24:13 -05:00
Fabian Fülling eaa7e717a2 Fixes #2039 Convert None to 0 when checking if ELB cookie expiration has changed 2016-12-08 11:24:12 -05:00
Jonathan Davila f24c3fb40e Clarified IAM module doc 2016-12-08 11:24:12 -05:00
Neil Saunders 83039b93f0 Fix for issue #3109: Executing ec2_group with rules fails with "Invalid rule parameter '['" 2016-12-08 11:24:11 -05:00
Nate Brown b891b0c9bc ELB Proxy Protocol support for backends 2016-12-08 11:24:11 -05:00
Joel e3de705d0c Allow us to sort by all available datatypes 2016-12-08 11:24:11 -05:00
Brian Coca b61d531dfc corrected typo on aws connection arguments var 2016-12-08 11:24:10 -05:00
Constantin07 33079b2b7f Treat 'is_public' option as a bool 2016-12-08 11:24:10 -05:00
Tom Bamford 1cace51ed6 Bugfix: Permit SOA record type 2016-12-08 11:24:09 -05:00
Ryan-Neal Mes 2fa3f16012 Indented code so it only executes tag comparison for matching cird values 2016-12-08 11:24:09 -05:00
Will Thames 52accd7d1f Use connect_to_aws where possible
`connect_to_aws` fixes a bug with security tokens in AWS.
Modules should use that rather than calling
`boto.x.connect_to_region`
2016-12-08 11:24:09 -05:00
Jonathan Davila 7f338e13ff Updated ec2_lc docs 2016-12-08 11:24:08 -05:00
Constantin07 3dde5196aa Added explicit type for 'tags' option 2016-12-08 11:24:08 -05:00
Constantin07 94345349a6 Fixing issue #3057 - AttributeError: 'str' object has no attribute 'items' 2016-12-08 11:24:07 -05:00
Scott Brown ba2bc1dbfe Fixing missing interpolation variable 2016-12-08 11:24:07 -05:00
Daniel Petty f26199d962 replaced sudo with become 2016-12-08 11:24:06 -05:00
Matt Martz aaf762573e Various simple linting type cleanups on modules 2016-12-08 11:24:06 -05:00
jjshoe 56f1d6f794 Less engrish 2016-12-08 11:24:04 -05:00
Michael Baydoun 7234ead259 Update ec2.py
Documentation is not clear that tag used in count_tags must be an existing instance_tag
2016-12-08 11:24:04 -05:00
Ben Visser 8769c33e46 changing default of cache_security_groups to none, removing the ['default']
OCD is making me fix the inconsistency with how None is typed. First Letter Capitalized All Over Now.

cleaning up the default object that was created for the cache_security_groups and removing checks dealing with it.

clean up space

Changing default cache_security_groups from [default] to None.
2016-12-08 11:24:02 -05:00
Toshio Kuratomi f6aa1ff9a4 Remove duplicate documentation fields 2016-12-08 11:24:01 -05:00
Shawn Silva 12be401c11 The parameters 'template' and 'template_url' are incorrectly required in all cases.
If the state is 'absent' they should not be required. A few lines below the correct check is already in place.
2016-12-08 11:24:01 -05:00
techraf 896dcd9787 Fixed typo in example playbook 2016-12-08 11:24:00 -05:00
Brian Coca a0204b80dc tabs are bad 2016-12-08 11:24:00 -05:00
Tom Bamford 68f76c50d8 Remove explicit region parameter from ec2_ami_find 2016-12-08 11:24:00 -05:00
Ben Visser 18ff22348a fixed grammatical issue in iam.py. exit -> exist. 2016-12-08 11:24:00 -05:00
Yoichi Imai b9b08666f5 Fix iam_policy pdoc variable 2016-12-08 11:24:00 -05:00
Jason Paige a2f4d46c9b updating choices for rds parameter engines 2016-12-08 11:24:00 -05:00
Bermudez, Jaime efbdea909e Simplify logic around "present" state and skip dupes. If the policy doesn't exist or the policy document doesn't match or if we're not skipping dupes, then we go ahead and update the respective user/group/role policy. 2016-12-08 11:23:59 -05:00
Henrique Rodrigues c2e62ed9a9 Fix misspelling of the word 'certificate' 2016-12-08 11:23:59 -05:00
Brian Coca 6e73c61298 added version_added 2016-12-08 11:23:59 -05:00
Constantin07 f36c567022 Added delete_on_termination option for volume attachment 2016-12-08 11:23:59 -05:00
Matt Ferrante 2dd53a8d91 updated s3 module documentation 2016-12-08 11:23:59 -05:00
Brian Coca f50fbe9dd2 updated s3 docs to reflect mode choices
fixes #2318
2016-12-08 11:23:58 -05:00
autotune 90631aef1b 1113 fix ec2 subnet tags 2016-12-08 11:23:58 -05:00
Brian Coca a5e4969dc4 updated version_added 2016-12-08 11:23:58 -05:00
Joost Cassee 267dcc8eb6 Add wait_timeout option to route53 module
This option is used to make sure the module does not block forever.
2016-12-08 11:23:58 -05:00
Joost Cassee e91bcba078 Add wait option to route53 module
This option makes the module wait for the changes to replicate to all
Amazon DNS servers.
2016-12-08 11:23:58 -05:00
Ben Visser cfed7e11d8 two choices for cache engine. adding them.
revert spacing

undoing quotes around default. will do another pull requests

Making documentation more explicit for elasticache engine choices.
2016-12-08 11:23:58 -05:00
krdlab c680611fe4 Fix `self.changed` value in `ElbManager` (ec2_elb_lb) 2016-12-08 11:23:57 -05:00
Brian Coca 351de21ee7 made port default depending on db engine 2016-12-08 11:23:57 -05:00
Brian Coca 1fe3387971 crrected version added 2016-12-08 11:23:57 -05:00
Jon Hadfield d0e37fa542 return allocation id for vpc address. 2016-12-08 11:23:56 -05:00
Ben Visser a01fe88263 staging that num_nodes is required when state=present 2016-12-08 11:23:56 -05:00
Brian Coca 1367e73c94 be smarter when dealing with policy_json input
Now module will assume that if the argument is a string it is already formated as json
and will only try to convert non strings into json string.
Also removed unused 'msg' var declarations and the ifs that set them
fixes #2009
2016-12-08 11:23:56 -05:00
Etherdaemon eba78d08f9 Update to wait and wait_timeout with a maximum of 10 minutes timeout 2016-12-08 11:23:55 -05:00
Etherdaemon cd3f306518 Proposing a wait_for function to ensure elb has been successfully removed 2016-12-08 11:23:55 -05:00
Mike Buzzetti f20b09e2ec Add evaluate taget health for alias based records 2016-12-08 11:23:55 -05:00
Andy Nelson 444895f889 Update to ec2_vpc.py to: 1 allow interface ids and vpc peering connections as route targets 2 set state to "terminated" when VPC is removed 3 fix some comment typos
updates per PR comments
2016-12-08 11:23:54 -05:00
HAMSIK Adam 2af105bcbc Convert enabled value to boolean to actually work, make sure we can set expiration period to 0(None) to disable it 2016-12-08 11:23:53 -05:00
Brian Coca 9259b51c97 updated module docs, added choices to state 2016-12-08 11:23:53 -05:00
Michel Alexandre Salim 325a979876 Set the argument type for ec2_vol's encrypted parameter
If this is not set, Ansible parses the parameter as a string.
This is fine if the parameter is not provided by the caller, but
if it is set to False or True explicitly, ec2_vol receives this as
the string 'False' or the string 'True', both of which are truthy.

Thus, without this fix, setting the parameter results in encryption
always enabled.
2016-12-08 11:23:52 -05:00
Arthur Clement 7c8d3d9b20 Example of single instance with ssd gp2 root volume creation 2016-12-08 11:23:50 -05:00
Toshio Kuratomi 6cb1606005 Don't raise or catch StandardError in amazon modules 2016-12-08 11:23:50 -05:00
Jay Rogers bef2b75857 Update in Amazon IAM Policy Documentation
There were typos in the documentation that made the examples seem misleading of what was being demonstrated. This update fixes that.
2016-12-08 11:23:49 -05:00
Michel Alexandre Salim fba26fda1c Fix ec2_snapshot documentation
last_snapshot_min_age is added in 2.0, not 1.9
2016-12-08 11:23:49 -05:00