community.general/lib/ansible
Toshio Kuratomi 6db6edfc4f YAML treats some unquoted strings as booleans. For instance, (#16961)
uri:
    follow_redirects: no

Will lead yaml to set follow_redirects=False.  This is problematic when
the module parameter is not a boolean value but a string.  For instance:

  follow_redirects = dict(required=False, default='safe', choices=['all', 'safe', 'none', 'yes', 'no']),

Our parameter validation code ends up getting follow_redirects="False"
instead of "no".  The 100% fix is for the user to quote their strings in
playbooks like:
  uri:
    follow_redirects: "no"

But we can fix quite a few common cases by trying to switch "False" back
into the string that it was specified as.  We only do this if there is
only one correct choices value that could have been specified.  In the
follow_redirects example, a value of "True" only maps back to "yes" and
a value of "False" only maps back to "no" so we can do this.  If choices
also contained "on" and "off" then we couldn't map back safely and would
need to force the module author to change the module to handle this
case.

Fixes parts of the following PRs:

* https://github.com/ansible/ansible-modules-core/pull/4220
* https://github.com/ansible/ansible-modules-extras/pull/2593
2016-08-05 06:49:34 -07:00
..
cli added check and diff mode control to console 2016-07-25 08:05:56 -04:00
compat Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
config Making the switch to v2 2015-05-03 21:47:26 -05:00
errors Fix some typos (#16498) 2016-06-29 14:31:25 -04:00
executor fix for unspecified retries on until + test (#16963) 2016-08-04 19:20:45 -04:00
galaxy Fixes #163 in galaxy-issues 2016-07-21 14:04:17 -04:00
inventory Implicit localhost ondemand (#16900) 2016-08-02 10:39:00 -04:00
module_utils YAML treats some unquoted strings as booleans. For instance, (#16961) 2016-08-05 06:49:34 -07:00
modules Update submodule refs 2016-07-26 05:22:59 -07:00
parsing warn when searching for an empty string or null 2016-07-26 08:26:07 -04:00
playbook FEATURE: adding variable serial batches 2016-08-04 15:04:10 -05:00
plugins add transparent vault use to other plugins (#16957) 2016-08-04 18:35:30 -04:00
template allow spaces before the filter string (#16312) 2016-06-15 14:17:17 -04:00
utils * Fix race in creating temp directories pre-fork (#16965) 2016-08-04 19:35:36 -04:00
vars Implicit localhost ondemand (#16900) 2016-08-02 10:39:00 -04:00
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
constants.py * Fix race in creating temp directories pre-fork (#16965) 2016-08-04 19:35:36 -04:00
release.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
test-requirements.txt Making the switch to v2 2015-05-03 21:47:26 -05:00