Commit 9a930fb4 by James Cammarata

Add pyc/pyo to ignore list for inventory directories

Fixes #7308
parent d4e11c5c
...@@ -38,16 +38,11 @@ class InventoryDirectory(object): ...@@ -38,16 +38,11 @@ class InventoryDirectory(object):
self.groups = {} self.groups = {}
for i in self.names: for i in self.names:
if i.endswith("~") or i.endswith(".orig") or i.endswith(".bak"): # Skip files that end with certain extensions or characters
continue for ext in ("~", ".orig", ".bak", ".ini", ".retry", ".pyc", ".pyo"):
if i.endswith(".ini"): if i.endswith(ext):
# configuration file for an inventory script continue
continue
if i.endswith(".retry"):
# this file is generated on a failed playbook and should only be
# used when run specifically
continue
# Skip hidden files # Skip hidden files
if i.startswith('.') and not i.startswith('./'): if i.startswith('.') and not i.startswith('./'):
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment