From 39e86ae2bc3a0090d4dca3ae9a7eedfe6b2be5ae Mon Sep 17 00:00:00 2001 From: Daniel Yates Date: Sat, 22 Oct 2016 17:23:03 +0100 Subject: [PATCH] Correctly read use_private_network as boolean This fixes the use of public IPs in the discovered hosts by ensuring that the use_private_network check doesn't always evaluate to False if the associated .ini file specifies this option. --- contrib/inventory/digital_ocean.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/inventory/digital_ocean.py b/contrib/inventory/digital_ocean.py index 4d23e2fd5d..21e0dbc7f3 100755 --- a/contrib/inventory/digital_ocean.py +++ b/contrib/inventory/digital_ocean.py @@ -260,7 +260,7 @@ or environment variables (DO_API_TOKEN)\n''') # Private IP Address if config.has_option('digital_ocean', 'use_private_network'): - self.use_private_network = config.get('digital_ocean', 'use_private_network') + self.use_private_network = config.getboolean('digital_ocean', 'use_private_network') # Group variables if config.has_option('digital_ocean', 'group_variables'):