Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
2432b45e
Commit
2432b45e
authored
May 14, 2014
by
Kevin Bell
Committed by
James Cammarata
May 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed extension filtering in InventoryDirectory
parent
d6214c5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
lib/ansible/inventory/dir.py
+3
-4
No files found.
lib/ansible/inventory/dir.py
View file @
2432b45e
...
@@ -36,13 +36,12 @@ class InventoryDirectory(object):
...
@@ -36,13 +36,12 @@ class InventoryDirectory(object):
self
.
parsers
=
[]
self
.
parsers
=
[]
self
.
hosts
=
{}
self
.
hosts
=
{}
self
.
groups
=
{}
self
.
groups
=
{}
for
i
in
self
.
names
:
for
i
in
self
.
names
:
# Skip files that end with certain extensions or characters
# Skip files that end with certain extensions or characters
for
ext
in
(
"~"
,
".orig"
,
".bak"
,
".ini"
,
".retry"
,
".pyc"
,
".pyo"
):
if
any
(
i
.
endswith
(
ext
)
for
ext
in
(
"~"
,
".orig"
,
".bak"
,
".ini"
,
".retry"
,
".pyc"
,
".pyo"
)):
if
i
.
endswith
(
ext
):
continue
continue
# Skip hidden files
# Skip hidden files
if
i
.
startswith
(
'.'
)
and
not
i
.
startswith
(
'./'
):
if
i
.
startswith
(
'.'
)
and
not
i
.
startswith
(
'./'
):
continue
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment