mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
21f8c0bc96
commit
393124e462
1 changed files with 5 additions and 10 deletions
|
@ -38,16 +38,11 @@ class InventoryDirectory(object):
|
|||
self.groups = {}
|
||||
|
||||
for i in self.names:
|
||||
|
||||
if i.endswith("~") or i.endswith(".orig") or i.endswith(".bak"):
|
||||
continue
|
||||
if i.endswith(".ini"):
|
||||
# configuration file for an inventory script
|
||||
continue
|
||||
if i.endswith(".retry"):
|
||||
# this file is generated on a failed playbook and should only be
|
||||
# used when run specifically
|
||||
continue
|
||||
|
||||
# Skip files that end with certain extensions or characters
|
||||
for ext in ("~", ".orig", ".bak", ".ini", ".retry", ".pyc", ".pyo"):
|
||||
if i.endswith(ext):
|
||||
continue
|
||||
# Skip hidden files
|
||||
if i.startswith('.') and not i.startswith('./'):
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue