Skip to content

Commit 8060f1d

Browse files
committed
Fix splitting of inventory filename into group name.
This fixes support for group data matching inventory groups with dots in the filename.
1 parent 8530b32 commit 8060f1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyinfra_cli/inventory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def make_inventory(
108108
groups = _get_groups_from_filename(inventory_filename)
109109
# Used to set all the hosts to an additional group - that of the filename
110110
# ie inventories/dev.py means all the hosts are in the dev group, if not present
111-
file_groupname = path.basename(inventory_filename).rsplit('.')[0]
111+
file_groupname = path.basename(inventory_filename).rsplit('.', 1)[0]
112112

113113
all_data = {}
114114

0 commit comments

Comments
 (0)