Skip to content

Commit

Permalink
Changed 'all' group to 'scaleway' group to avoid conflict with real '…
Browse files Browse the repository at this point in the history
…all' group. Closes #ansible#35092 (ansible#42367)
  • Loading branch information
mhalano authored and samdoran committed Jul 5, 2018
1 parent b90ae65 commit 82b050e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/inventory/scaleway.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def cache_available(config):

def generate_inv_from_api(config):
try:
inventory['all'] = copy.deepcopy(EMPTY_GROUP)
inventory['scaleway'] = copy.deepcopy(EMPTY_GROUP)

if config.has_option('auth', 'api_token'):
auth_token = config.get('auth', 'api_token')
Expand Down Expand Up @@ -186,15 +186,15 @@ def generate_inv_from_api(config):
if region not in inventory:
inventory[region] = copy.deepcopy(EMPTY_GROUP)
inventory[region]['children'].append(hostname)
inventory['all']['children'].append(hostname)
inventory['scaleway']['children'].append(hostname)
inventory[hostname] = []
inventory[hostname].append(ip)

return inventory
except Exception:
# Return empty hosts output
traceback.print_exc()
return {'all': {'hosts': []}, '_meta': {'hostvars': {}}}
return {'scaleway': {'hosts': []}, '_meta': {'hostvars': {}}}


def get_inventory(config):
Expand Down

0 comments on commit 82b050e

Please sign in to comment.