We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running the elb_classic_lb_info module it used to return all classic ELBs for the given account region, as the documentation still states for latest Ansible, see https://docs.ansible.com/ansible/latest/collections/community/aws/elb_classic_lb_info_module.html
List of ELB names to gather information about. Pass this option to gather information about a set of ELBs, otherwise, all ELBs are returned.
But this holds no longer true. If no name is provided nothing is returned. When looing at the code this is quite obvious why. As name defaults to an empty list and the list method iterates over the list of names, which does nothing when empty, see https://github.com/ansible-collections/community.aws/blob/main/plugins/modules/elb_classic_lb_info.py#L160
When passing in a name it will return info just fine.
Bug Report
community.aws.elb_classic_lb_info
$ ansible --version ansible [core 2.11.5] config file =./ansible.cfg configured module search path = ['./library', '~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = ~/.local/lib/python3.9/site-packages/ansible ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections executable location = ~/.local/bin/ansible python version = 3.9.5 (default, May 11 2021, 08:20:37) [GCC 10.3.0] jinja version = 3.0.1 libyaml = True
$ ansible-galaxy collection list # ~/.ansible/collections/ansible_collections Collection Version -------------------- ------- amazon.aws 1.5.0 ansible.posix 1.3.0 community.aws 1.5.0 community.general 3.6.0 community.postgresql 1.4.0 community.rabbitmq 1.1.0
- name: Get ELBs information for classic loabalancers community.aws.elb_classic_lb_info: register: all_classic_elbs - name: Output ELB infos ansible.builtin.debug: var: all_classic_elbs
List of ELBs in all_classic_elbs.elbs
all_classic_elbs.elbs
ok: [localhost] => { "all_classic_elbs": { "changed": false, "elbs": [], "failed": false } }
The text was updated successfully, but these errors were encountered:
Probably introduced in this commit 3d5ffdc
Sorry, something went wrong.
A task like
- name: Get ELBs information for classic loabalancers community.aws.elb_classic_lb_info: names: - My-Existing-Loadbalancer register: all_classic_elbs
Returns results just fine. So either docs or code needs to be fixed.
Successfully merging a pull request may close this issue.
Summary
When running the elb_classic_lb_info module it used to return all classic ELBs for the given account region, as the documentation still states for latest Ansible, see https://docs.ansible.com/ansible/latest/collections/community/aws/elb_classic_lb_info_module.html
But this holds no longer true. If no name is provided nothing is returned. When looing at the code this is quite obvious why. As name defaults to an empty list and the list method iterates over the list of names, which does nothing when empty, see https://github.com/ansible-collections/community.aws/blob/main/plugins/modules/elb_classic_lb_info.py#L160
When passing in a name it will return info just fine.
Issue Type
Bug Report
Component Name
community.aws.elb_classic_lb_info
Ansible Version
Collection Versions
Steps to Reproduce
Expected Results
List of ELBs in
all_classic_elbs.elbs
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: