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
a56e1f31
Commit
a56e1f31
authored
Nov 28, 2012
by
Daniel Hokka Zakrisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly restrict hosts after
9070875a
parent
f6245e17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/ansible/playbook/__init__.py
+5
-5
No files found.
lib/ansible/playbook/__init__.py
View file @
a56e1f31
...
...
@@ -239,10 +239,10 @@ class PlayBook(object):
# *****************************************************
def
_list_available_hosts
(
self
):
def
_list_available_hosts
(
self
,
*
args
):
''' returns a list of hosts that haven't failed and aren't dark '''
return
[
h
for
h
in
self
.
inventory
.
list_hosts
()
if
(
h
not
in
self
.
stats
.
failures
)
and
(
h
not
in
self
.
stats
.
dark
)]
return
[
h
for
h
in
self
.
inventory
.
list_hosts
(
*
args
)
if
(
h
not
in
self
.
stats
.
failures
)
and
(
h
not
in
self
.
stats
.
dark
)]
# *****************************************************
...
...
@@ -347,7 +347,7 @@ class PlayBook(object):
def
_do_setup_step
(
self
,
play
):
''' get facts from the remote system '''
host_list
=
self
.
_list_available_hosts
()
host_list
=
self
.
_list_available_hosts
(
play
.
hosts
)
if
play
.
gather_facts
is
False
:
return
{}
...
...
@@ -396,7 +396,7 @@ class PlayBook(object):
# now with that data, handle contentional variable file imports!
all_hosts
=
self
.
_list_available_hosts
()
all_hosts
=
self
.
_list_available_hosts
(
play
.
hosts
)
play
.
update_vars_files
(
all_hosts
)
serialized_batch
=
[]
...
...
@@ -431,7 +431,7 @@ class PlayBook(object):
# just didn't match anything and that's ok
return
False
host_list
=
self
.
_list_available_hosts
()
host_list
=
self
.
_list_available_hosts
(
play
.
hosts
)
# if no hosts remain, drop out
if
not
host_list
:
...
...
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