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
cfdaec0c
Commit
cfdaec0c
authored
Sep 15, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure string attributes are strings from YAML to avoid bad type conversions
Fixes #12367
parent
7c669f5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lib/ansible/playbook/base.py
+6
-0
No files found.
lib/ansible/playbook/base.py
View file @
cfdaec0c
...
...
@@ -231,6 +231,12 @@ class Base:
method
=
getattr
(
self
,
'_validate_
%
s'
%
name
,
None
)
if
method
:
method
(
attribute
,
name
,
getattr
(
self
,
name
))
else
:
# and make sure the attribute is of the type it should be
value
=
getattr
(
self
,
name
)
if
value
is
not
None
:
if
attribute
.
isa
==
'string'
and
not
isinstance
(
value
,
string_types
):
raise
AnsibleParserError
(
"The field '
%
s' is supposed to be a string type, however the incoming data structure is a
%
s"
%
(
name
,
type
(
value
)),
obj
=
self
.
get_ds
())
def
copy
(
self
):
'''
...
...
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