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
da890f93
Commit
da890f93
authored
Jul 17, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11622 from amenonsen/gathering
devel breaks «gathering=explicit» setting in ansible.cfg
parents
76496037
28e2eae9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
lib/ansible/executor/play_iterator.py
+13
-1
lib/ansible/playbook/play.py
+1
-1
No files found.
lib/ansible/executor/play_iterator.py
View file @
da890f93
...
...
@@ -19,6 +19,8 @@
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
ansible
import
constants
as
C
from
ansible.errors
import
*
from
ansible.playbook.block
import
Block
from
ansible.playbook.task
import
Task
...
...
@@ -130,7 +132,17 @@ class PlayIterator:
elif
s
.
run_state
==
self
.
ITERATING_SETUP
:
s
.
run_state
=
self
.
ITERATING_TASKS
s
.
pending_setup
=
True
if
self
.
_play
.
gather_facts
==
'smart'
and
not
host
.
_gathered_facts
or
boolean
(
self
.
_play
.
gather_facts
):
# Gather facts if the default is 'smart' and we have not yet
# done it for this host; or if 'explicit' and the play sets
# gather_facts to True; or if 'implicit' and the play does
# NOT explicitly set gather_facts to False.
gathering
=
C
.
DEFAULT_GATHERING
if
((
gathering
==
'smart'
and
not
host
.
_gathered_facts
)
or
(
gathering
==
'explicit'
and
boolean
(
self
.
_play
.
gather_facts
))
or
(
gathering
==
'implicit'
and
(
self
.
_play
.
gather_facts
is
None
or
boolean
(
self
.
_play
.
gather_facts
)))):
if
not
peek
:
# mark the host as having gathered facts
host
.
set_gathered_facts
(
True
)
...
...
lib/ansible/playbook/play.py
View file @
da890f93
...
...
@@ -58,7 +58,7 @@ class Play(Base, Taggable, Become):
_accelerate_port
=
FieldAttribute
(
isa
=
'int'
,
default
=
5099
)
# should be alias of port
# Connection
_gather_facts
=
FieldAttribute
(
isa
=
'
string'
,
default
=
'smart'
)
_gather_facts
=
FieldAttribute
(
isa
=
'
bool'
,
default
=
None
)
_hosts
=
FieldAttribute
(
isa
=
'list'
,
default
=
[],
required
=
True
,
listof
=
string_types
)
_name
=
FieldAttribute
(
isa
=
'string'
,
default
=
''
)
...
...
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