diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2017-01-04 14:45:53 -0800 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2017-01-05 15:46:59 -0800 |
commit | 12db798e0c979790a988c94b2fb53f016e7195b0 (patch) | |
tree | f357598d876e441e5c098fff4cdde65a2be2e37c | |
parent | 6d7f02ce93f6240daf665bd51136d6df514fa4cc (diff) | |
download | ansible-modules-extras-12db798e0c979790a988c94b2fb53f016e7195b0.tar.gz |
Fix OSX defaults for lists
In modern ansible, parameters default to string type. This causes
issues for polymorphic parameters like this module's value param. note
that this fix restores ansible-2.0 and previous behaviour but it is not
perfect. If a parameter is specified via key=value or given on the
commandline then it will be a string before it reaches the module code.
There's nothing we can do about that.
Fixes #19585
(cherry picked from 5536ffe9784c429951f8a11185921c6316beb80d)
-rw-r--r-- | system/osx_defaults.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/system/osx_defaults.py b/system/osx_defaults.py index 5536fbf5..db804edd 100644 --- a/system/osx_defaults.py +++ b/system/osx_defaults.py @@ -84,7 +84,9 @@ EXAMPLES = ''' ''' import datetime -from ansible.module_utils.basic import * +import re + +from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.pycompat24 import get_exception # exceptions --------------------------------------------------------------- {{{ @@ -347,6 +349,7 @@ def main(): value=dict( default=None, required=False, + type='raw' ), state=dict( default="present", |