819fe45864
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. |
8 years ago | |
---|---|---|
.github | 9 years ago | |
cloud | 8 years ago | |
commands | 8 years ago | |
database | 8 years ago | |
files | 8 years ago | |
inventory | 9 years ago | |
network | 8 years ago | |
packaging | 8 years ago | |
source_control | 8 years ago | |
system | 8 years ago | |
test | 8 years ago | |
utilities | 8 years ago | |
web_infrastructure | 8 years ago | |
windows | 8 years ago | |
.gitignore | 10 years ago | |
.travis.yml | 8 years ago | |
CONTRIBUTING.md | 9 years ago | |
COPYING | 10 years ago | |
README.md | 9 years ago | |
VERSION | 9 years ago | |
__init__.py | 10 years ago | |
shippable.yml | 8 years ago | |
test-docs.sh | 10 years ago | |
test-requirements.txt | 9 years ago |
README.md
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.