No description
Find a file
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
.github Update GitHub templates to reflect ansible/ansible (#3900) 2016-06-10 11:57:00 -04:00
cloud Fix failure when powering on/off EC2 instances by tag only. (#4767) 2016-09-09 19:38:05 -04:00
commands Fixes ansible/ansible#15922 (#3793) 2016-09-07 15:22:16 -07:00
database Fix database table quoting in privileges_unpack() (#3858) 2016-08-31 14:23:54 -07:00
files Ensure unicode characters in zip-compressed filenames work correctly (#4702) 2016-09-09 09:26:19 -07:00
inventory Add missing GPLv3 License header 2015-07-03 22:57:53 -05:00
network minor updates to junos_package module for 2.2 (#4761) 2016-09-09 17:25:21 +01:00
packaging Python 3 fixes for apt_* modules. (#4754) 2016-09-08 17:56:09 -07:00
source_control to_text, to_bytes, and to_native now have surrogate_or_strict error handler (#4630) 2016-09-01 04:19:15 -07:00
system Add support for selinux_boolean_sub conversion (#4570) 2016-09-01 04:26:23 -07:00
test Only run integration script if it exists. 2016-08-11 15:51:08 -07:00
utilities updated include_role docs 2016-09-06 14:05:43 -04:00
web_infrastructure Fix change status on django_manage collectstatic. (#4239) 2016-08-30 12:25:46 +02:00
windows fix async_wrapper start suspended race (#4718) 2016-09-06 16:51:17 -07:00
.gitignore Add basic top level files. 2014-09-26 09:21:20 -04:00
.travis.yml We've decided that pythn 3.5 is the minimum python3 version (#4572) 2016-08-31 08:31:23 -07:00
__init__.py package files 2014-09-26 11:05:47 -04:00
CONTRIBUTING.md Fix broken link for issue template (#3680) 2016-06-23 19:51:45 -04:00
COPYING Add basic top level files. 2014-09-26 09:21:20 -04:00
README.md readme: add build state image from travis 2016-04-29 10:52:17 +02:00
shippable.yml Add python3 testing for module PRs. (#4629) 2016-08-31 16:59:54 -07:00
test-docs.sh Add testing of docs to the core repo 2015-06-29 12:42:50 -07:00
test-requirements.txt add some unit tests for the os_server module 2015-10-16 21:03:50 -04:00
VERSION Version bump for new beta 2.0.0-0.5.beta3 2015-11-13 16:46:32 -05:00

Build Status

ansible-modules-core

This repo contains Ansible's most popular modules that are shipped with Ansible.

New module submissions for modules that do not yet exist should be submitted to ansible-modules-extras, rather than this repo.

Take care to submit tickets to the appropriate repo where modules are contained. The docs.ansible.com website indicates this at the bottom of each module documentation page.

Reporting bugs

Take care to submit tickets to the appropriate repo where modules are contained. The repo is mentioned at the bottom of module documentation page at docs.ansible.com.

Testing modules

Ansible module development guide contains the latest info about that.

License

As with Ansible, modules distributed with Ansible are GPLv3 licensed. User generated modules not part of this project can be of any license.

Installation

There should be no need to install this repo separately as it should be included in any Ansible install using the official documented methods.