1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

linode inventory plugin: fix parsing of access_token (#318)

Read config before trying to use the config.

Original issue: https://github.com/ansible/ansible/issues/66874
This commit is contained in:
Kenyon Ralph 2020-05-13 04:37:23 -07:00 committed by GitHub
parent 43c805f7db
commit 4dad1ee6fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- linode inventory plugin - fix parsing of access_token (https://github.com/ansible/ansible/issues/66874)

View file

@ -194,11 +194,11 @@ class InventoryModule(BaseInventoryPlugin):
"""Dynamically parse Linode the cloud inventory."""
super(InventoryModule, self).parse(inventory, loader, path)
config_data = self._read_config_data(path)
self._build_client()
self._get_instances_inventory()
config_data = self._read_config_data(path)
regions, types = self._get_query_options(config_data)
self._filter_by_config(regions, types)