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
212296e5
Commit
212296e5
authored
Oct 02, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1207 from dagwieers/gather_facts-fix
Fix gather_facts assumption that SETUP_CACHE for a host is empty
parents
cef73d15
fedfd187
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
lib/ansible/playbook/__init__.py
+2
-1
No files found.
lib/ansible/playbook/__init__.py
View file @
212296e5
...
@@ -312,7 +312,7 @@ class PlayBook(object):
...
@@ -312,7 +312,7 @@ class PlayBook(object):
if
play
.
gather_facts
is
False
:
if
play
.
gather_facts
is
False
:
return
{}
return
{}
elif
play
.
gather_facts
is
None
:
elif
play
.
gather_facts
is
None
:
host_list
=
[
h
for
h
in
host_list
if
h
not
in
self
.
SETUP_CACHE
]
host_list
=
[
h
for
h
in
host_list
if
h
not
in
self
.
SETUP_CACHE
or
'module_setup'
not
in
self
.
SETUP_CACHE
[
h
]
]
if
len
(
host_list
)
==
0
:
if
len
(
host_list
)
==
0
:
return
{}
return
{}
...
@@ -335,6 +335,7 @@ class PlayBook(object):
...
@@ -335,6 +335,7 @@ class PlayBook(object):
# let runner template out future commands
# let runner template out future commands
setup_ok
=
setup_results
.
get
(
'contacted'
,
{})
setup_ok
=
setup_results
.
get
(
'contacted'
,
{})
for
(
host
,
result
)
in
setup_ok
.
iteritems
():
for
(
host
,
result
)
in
setup_ok
.
iteritems
():
self
.
SETUP_CACHE
[
host
]
.
update
({
'module_setup'
:
True
})
self
.
SETUP_CACHE
[
host
]
.
update
(
result
.
get
(
'ansible_facts'
,
{}))
self
.
SETUP_CACHE
[
host
]
.
update
(
result
.
get
(
'ansible_facts'
,
{}))
return
setup_results
return
setup_results
...
...
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