Changed 'all' group to 'scaleway' group to avoid conflict with real 'all' group. Closes ##35092 (#42367)

pull/42376/head
Marcos Alano 6 years ago committed by Sam Doran
parent b90ae65e5c
commit 82b050e6b8

@ -150,7 +150,7 @@ def cache_available(config):
def generate_inv_from_api(config): def generate_inv_from_api(config):
try: try:
inventory['all'] = copy.deepcopy(EMPTY_GROUP) inventory['scaleway'] = copy.deepcopy(EMPTY_GROUP)
if config.has_option('auth', 'api_token'): if config.has_option('auth', 'api_token'):
auth_token = config.get('auth', 'api_token') auth_token = config.get('auth', 'api_token')
@ -186,7 +186,7 @@ def generate_inv_from_api(config):
if region not in inventory: if region not in inventory:
inventory[region] = copy.deepcopy(EMPTY_GROUP) inventory[region] = copy.deepcopy(EMPTY_GROUP)
inventory[region]['children'].append(hostname) inventory[region]['children'].append(hostname)
inventory['all']['children'].append(hostname) inventory['scaleway']['children'].append(hostname)
inventory[hostname] = [] inventory[hostname] = []
inventory[hostname].append(ip) inventory[hostname].append(ip)
@ -194,7 +194,7 @@ def generate_inv_from_api(config):
except Exception: except Exception:
# Return empty hosts output # Return empty hosts output
traceback.print_exc() traceback.print_exc()
return {'all': {'hosts': []}, '_meta': {'hostvars': {}}} return {'scaleway': {'hosts': []}, '_meta': {'hostvars': {}}}
def get_inventory(config): def get_inventory(config):

Loading…
Cancel
Save