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
c909b668
Commit
c909b668
authored
Mar 14, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use iteritems vs items(), probably doesn't matter that much
parent
a735dd2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/ansible/playbook.py
+5
-5
No files found.
lib/ansible/playbook.py
View file @
c909b668
...
...
@@ -365,7 +365,7 @@ class PlayBook(object):
dark
=
results
.
get
(
"dark"
,
{})
contacted
=
results
.
get
(
"contacted"
,
{})
for
host
,
msg
in
dark
.
items
():
for
host
,
msg
in
dark
.
ite
rite
ms
():
self
.
processed
[
host
]
=
1
self
.
callbacks
.
on_unreachable
(
host
,
msg
)
if
not
host
in
self
.
dark
:
...
...
@@ -373,7 +373,7 @@ class PlayBook(object):
else
:
self
.
dark
[
host
]
=
self
.
dark
[
host
]
+
1
for
host
,
results
in
contacted
.
items
():
for
host
,
results
in
contacted
.
ite
rite
ms
():
self
.
processed
[
host
]
=
1
if
is_failed
(
results
):
...
...
@@ -401,7 +401,7 @@ class PlayBook(object):
subtasks
=
task
.
get
(
'notify'
,
[])
if
len
(
subtasks
)
>
0
:
for
host
,
results
in
contacted
.
items
():
for
host
,
results
in
contacted
.
ite
rite
ms
():
if
results
.
get
(
'changed'
,
False
):
for
subtask
in
subtasks
:
self
.
_flag_handler
(
handlers
,
subtask
,
host
)
...
...
@@ -446,7 +446,7 @@ class PlayBook(object):
# written to the JSON file and will also bubble facts back up via
# magic in Runner()
push_var_str
=
''
for
(
k
,
v
)
in
vars
.
items
():
for
(
k
,
v
)
in
vars
.
ite
rite
ms
():
push_var_str
+=
"
%
s=
%
s "
%
(
k
,
v
)
# push any variables down to the system
...
...
@@ -476,7 +476,7 @@ class PlayBook(object):
# now for each result, load into the setup cache so we can
# let runner template out future commands
setup_ok
=
setup_results
.
get
(
'contacted'
,
{})
for
(
host
,
result
)
in
setup_ok
.
items
():
for
(
host
,
result
)
in
setup_ok
.
ite
rite
ms
():
SETUP_CACHE
[
host
]
=
result
# run all the top level tasks, these get run on every node
...
...
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