Skip to content

Commit b8d7edf

Browse files
authored
Merge pull request #35 from synkd/create_inventory_file_if_not_present
Create inventory file if absent when loading
2 parents 6081c0f + 414b57d commit b8d7edf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

manifester/helpers.py

+2
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ def load_inventory_file(file):
154154
155155
:return: list of dictionaries
156156
"""
157+
if not file.is_file():
158+
file.touch()
157159
if file.suffix not in (".yaml", ".yml"):
158160
logger.warn(
159161
f"Found invalid inventory file {file}. Inventory file must exist and "

0 commit comments

Comments
 (0)