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
9ede6f7f
Commit
9ede6f7f
authored
Mar 26, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert gather_facts to a boolean value if it is not None
Fixes #5618
parent
2a976ac3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
lib/ansible/playbook/play.py
+7
-1
No files found.
lib/ansible/playbook/play.py
View file @
9ede6f7f
...
...
@@ -117,7 +117,6 @@ class Play(object):
self
.
sudo
=
ds
.
get
(
'sudo'
,
self
.
playbook
.
sudo
)
self
.
sudo_user
=
ds
.
get
(
'sudo_user'
,
self
.
playbook
.
sudo_user
)
self
.
transport
=
ds
.
get
(
'connection'
,
self
.
playbook
.
transport
)
self
.
gather_facts
=
ds
.
get
(
'gather_facts'
,
None
)
self
.
remote_port
=
self
.
remote_port
self
.
any_errors_fatal
=
utils
.
boolean
(
ds
.
get
(
'any_errors_fatal'
,
'false'
))
self
.
accelerate
=
utils
.
boolean
(
ds
.
get
(
'accelerate'
,
'false'
))
...
...
@@ -128,6 +127,13 @@ class Play(object):
self
.
su_user
=
ds
.
get
(
'su_user'
,
self
.
playbook
.
su_user
)
#self.vault_password = vault_password
# gather_facts is not a simple boolean, as None means that a 'smart'
# fact gathering mode will be used, so we need to be careful here as
# calling utils.boolean(None) returns False
self
.
gather_facts
=
ds
.
get
(
'gather_facts'
,
None
)
if
self
.
gather_facts
:
self
.
gather_facts
=
utils
.
boolean
(
self
.
gather_facts
)
# Fail out if user specifies a sudo param with a su param in a given play
if
(
ds
.
get
(
'sudo'
)
or
ds
.
get
(
'sudo_user'
))
and
(
ds
.
get
(
'su'
)
or
ds
.
get
(
'su_user'
)):
raise
errors
.
AnsibleError
(
'sudo params ("sudo", "sudo_user") and su params '
...
...
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