1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins/inventory
patchback[bot] 4d74aa05a8
Fix linode inventory filtering (#4336) (#4356)
* Fix linode inventory filtering

There was a regression introduced in the addition of caching. The
`_consume_options` method was added and provided the `config_data`
dictionary. This `pop`s every entry, resulting in an empty `config_data`
dict, which was then reused and expected to be populated.

After reviewing, `_consume_data` doesn't need to be called. Also, once
the ``_read_config_data` method has been called, we no longer need the
config_data dict, and can instead use the `get_option` method throughout.

Once those were removed, the filtering function seemed a bit odd, since
we were no longer using the file. I used that opportunity to move the
filter calls into the populate function directly.

* Remove tests that target removed methods

This removes tests that targeted some custom methods on configuration
file handling. These are no longer necessary since they are now handled
by the BaseInventoryPlugin `_read_config_data` method.

* Add changelog entry for linode inventory bugfix

* Revert filters back to their own method

This moves filters back into their own method, but now uses the
get_option calls to pull filter configuration items.

(cherry picked from commit 386bb4bdd5)

Co-authored-by: steven jacobs <stjacobs@fastmail.fm>
2022-03-14 20:56:13 +01:00
..
cobbler.py [inventory/cobbler] Add include_profiles option (#4068) (#4121) 2022-01-31 06:20:07 +01:00
gitlab_runners.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
icinga2.py Added new feature for ansible_user and ansible_port in Icinga2 inventory source (#4088) (#4130) 2022-01-31 20:22:59 +01:00
linode.py Fix linode inventory filtering (#4336) (#4356) 2022-03-14 20:56:13 +01:00
lxd.py LXD inventory: Support virtual machines (#3519) (#3900) 2021-12-14 06:42:47 +01:00
nmap.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
online.py update scaleway maintainers (#3472) (#3873) 2021-12-08 20:20:59 +01:00
opennebula.py Fix some more instances of ansible.module_utils._text. (#4232) (#4233) 2022-02-19 08:21:01 +01:00
proxmox.py Update Proxmox Inventory Documentation with additional examples (#4148) (#4159) 2022-02-05 21:57:13 +01:00
scaleway.py Add profile parameter for scaleway inventory (#4049) (#4129) 2022-01-31 20:01:08 +01:00
stackpath_compute.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
virtualbox.py fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
xen_orchestra.py Update example (#4041) (#4047) 2022-01-16 20:55:03 +01:00