Skip to content

Commit

Permalink
Replace - character with _ in group names
Browse files Browse the repository at this point in the history
- is not a valid character.
  • Loading branch information
roczei committed Oct 28, 2020
1 parent 208560c commit 8269855
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions dynamic_inventory_cm_py2
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class ClouderaManagerInventory:
for cluster in clusters["items"]:
cluster_name = cluster.get("displayName")
cluster_name_updated = cluster_name.replace(" ", "_")
cluster_name_updated = cluster_name.replace("-", "_")
hosts = {"hosts" : []}
i = 2
while self.inventory.has_key(cluster_name_updated):
Expand Down
1 change: 1 addition & 0 deletions dynamic_inventory_cm_py3
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class ClouderaManagerInventory:
for cluster in clusters["items"]:
cluster_name = cluster.get("displayName")
cluster_name_updated = cluster_name.replace(" ", "_")
cluster_name_updated = cluster_name.replace("-", "_")
hosts = {"hosts" : []}
i = 2
while cluster_name_updated in self.inventory:
Expand Down

0 comments on commit 8269855

Please sign in to comment.