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
4caf85e3
Commit
4caf85e3
authored
Aug 27, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix --limit for external inventory scripts, slight variant on fix from pull #949
parent
4002cfbd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/ansible/inventory/__init__.py
+4
-4
No files found.
lib/ansible/inventory/__init__.py
View file @
4caf85e3
...
...
@@ -114,11 +114,11 @@ class Inventory(object):
positive_subsetp
=
[
p
for
p
in
self
.
_subset
if
not
p
.
startswith
(
"!"
)
]
negative_subsetp
=
[
p
for
p
in
self
.
_subset
if
p
.
startswith
(
"!"
)
]
if
len
(
positive_subsetp
):
positive_subset
=
self
.
_get_hosts
(
positive_subsetp
)
hosts
=
[
h
for
h
in
hosts
if
(
h
in
positive_subset
)
]
positive_subset
=
[
h
.
name
for
h
in
self
.
_get_hosts
(
positive_subsetp
)
]
hosts
=
[
h
for
h
in
hosts
if
(
h
.
name
in
positive_subset
)
]
if
len
(
negative_subsetp
):
negative_subset
=
self
.
_get_hosts
(
negative_subsetp
)
hosts
=
[
h
for
h
in
hosts
if
(
h
not
in
negative_subset
)]
negative_subset
=
[
h
.
name
for
h
in
self
.
_get_hosts
(
negative_subsetp
)
]
hosts
=
[
h
for
h
in
hosts
if
(
h
.
name
not
in
negative_subset
)]
# exclude hosts mentioned in any restriction (ex: failed hosts)
if
self
.
_restriction
is
not
None
:
...
...
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