Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Commit

Permalink
Fix bug in dynamic inventory layout
Browse files Browse the repository at this point in the history
  • Loading branch information
HACKERMD committed Jun 26, 2017
1 parent 26ae6b0 commit 5b3e513
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tmdeploy/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ def build_inventory(setup):
if group.name not in inventory:
inventory[group.name] = {'hosts': list()}
inventory[group.name]['hosts'].append(host_name)
inventory[group.name]['vars'] = dict()
if group.vars is not None:
inventory[group.name]['vars'] = group.vars
inventory[group.name]['vars'].update(group.vars)
if node_type.vars is not None:
inventory[group.name]['vars'] = node_type.vars
inventory[group.name]['vars'].update(node_type.vars)

return inventory

Expand Down

0 comments on commit 5b3e513

Please sign in to comment.