Allow value to be bool where 'yes'/'no' are in choices (#2593)

* Changed type of 'details' argument to bool on ecs_service_facts module.

* Changed type of 'autostart' argument to bool on virt_* modules.

* Changed types of 'autoconnect' and 'stp' argument to bool on nmcli module.
('create_connection_bridge(self)' and 'modify_connection_bridge(self)' are not implemented yet?)

* Added conversion of 'value' argument when 'vtype' is boolean on debconf module.
This commit is contained in:
Shinichi TAMURA 2016-08-17 23:32:49 +09:00 committed by Matt Clay
commit a3860ecf1e
5 changed files with 30 additions and 21 deletions

View file

@ -108,6 +108,11 @@ def set_selection(module, pkg, question, vtype, value, unseen):
if unseen:
cmd.append('-u')
if vtype == 'boolean':
if value == 'True':
value = 'true'
elif value == 'False':
value = 'false'
data = ' '.join([pkg, question, vtype, value])
return module.run_command(cmd, data=data)