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
ca112f64
Commit
ca112f64
authored
Jan 13, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5594 from willthames/allow_float_type
Allow float as an argument type in AnsibleModule
parents
bd426531
31f5ecea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lib/ansible/module_utils/basic.py
+6
-0
No files found.
lib/ansible/module_utils/basic.py
View file @
ca112f64
...
...
@@ -706,6 +706,12 @@ class AnsibleModule(object):
self
.
params
[
k
]
=
int
(
value
)
else
:
is_invalid
=
True
elif
wanted
==
'float'
:
if
not
isinstance
(
value
,
float
):
if
isinstance
(
value
,
basestring
):
self
.
params
[
k
]
=
float
(
value
)
else
:
is_invalid
=
True
else
:
self
.
fail_json
(
msg
=
"implementation error: unknown type
%
s requested for
%
s"
%
(
wanted
,
k
))
...
...
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