From 4b27d08643d91a799122e4085861277dba5004de Mon Sep 17 00:00:00 2001 From: Vlad Glagolev Date: Sun, 11 Dec 2016 06:38:38 -0500 Subject: [PATCH] dropped 'BOOLEANS' choices, converted env vars to str --- lib/ansible/modules/packaging/os/sorcery.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/packaging/os/sorcery.py b/lib/ansible/modules/packaging/os/sorcery.py index d60e9a0ec9..9b81bb609d 100644 --- a/lib/ansible/modules/packaging/os/sorcery.py +++ b/lib/ansible/modules/packaging/os/sorcery.py @@ -305,7 +305,7 @@ def update_codex(module): module.exit_json(changed=changed, msg="would have updated Codex") elif not fresh or params['name'] and params['state'] == 'latest': # SILENT is required as a workaround for query() in libgpg - module.run_command_environ_update.update(dict(SILENT=1)) + module.run_command_environ_update.update(dict(SILENT='1')) cmd_scribe = "%s update" % SORCERY['scribe'] @@ -475,7 +475,7 @@ def manage_spells(module): module.fail_json(msg="failed to backup the update queue") # see update_codex() - module.run_command_environ_update.update(dict(SILENT=1)) + module.run_command_environ_update.update(dict(SILENT='1')) cmd_sorcery = "%s queue" @@ -617,9 +617,8 @@ def main(): state = dict(default='present', choices=['present', 'latest', 'absent', 'cast', 'dispelled', 'rebuild']), depends = dict(default=None), - update = dict(default=False, choices=BOOLEANS, type='bool'), - update_cache = dict(default=False, aliases=['update_codex'], - choices=BOOLEANS, type='bool'), + update = dict(default=False, type='bool'), + update_cache = dict(default=False, aliases=['update_codex'], type='bool'), cache_valid_time = dict(default=0, type='int') ), required_one_of = [['name', 'update', 'update_cache']], @@ -633,7 +632,7 @@ def main(): SORCERY[c] = module.get_bin_path(c, True) # prepare environment: run sorcery commands without asking questions - module.run_command_environ_update = dict(PROMPT_DELAY=0, VOYEUR=0) + module.run_command_environ_update = dict(PROMPT_DELAY='0', VOYEUR='0') params = module.params