From 8047d97ffc3f7b366eb7cf5a394a47f8c565cd1d Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Mon, 18 Jun 2018 07:59:52 -0400 Subject: [PATCH] read scaleway option after the options have been set (#41259) --- lib/ansible/plugins/inventory/scaleway.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/inventory/scaleway.py b/lib/ansible/plugins/inventory/scaleway.py index 82f6ca0ed4..b8f9cd1859 100644 --- a/lib/ansible/plugins/inventory/scaleway.py +++ b/lib/ansible/plugins/inventory/scaleway.py @@ -82,7 +82,7 @@ class InventoryModule(BaseInventoryPlugin): def __init__(self): super(InventoryModule, self).__init__() - self.token = self.get_option("oauth_token") + self.token = None self.config_data = None def verify_file(self, path): @@ -146,6 +146,7 @@ class InventoryModule(BaseInventoryPlugin): def parse(self, inventory, loader, path, cache=True): super(InventoryModule, self).parse(inventory, loader, path) self.config_data = self._read_config_data(path=path) + self.token = self.get_option("oauth_token") for zone in self._get_zones(): self.do_zone_inventory(zone=zone)