dropped 'BOOLEANS' choices, converted env vars to str

This commit is contained in:
Vlad Glagolev 2016-12-11 06:38:38 -05:00 committed by Toshio Kuratomi
parent 5bf07454cb
commit 4b27d08643

View file

@ -305,7 +305,7 @@ def update_codex(module):
module.exit_json(changed=changed, msg="would have updated Codex") module.exit_json(changed=changed, msg="would have updated Codex")
elif not fresh or params['name'] and params['state'] == 'latest': elif not fresh or params['name'] and params['state'] == 'latest':
# SILENT is required as a workaround for query() in libgpg # 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'] cmd_scribe = "%s update" % SORCERY['scribe']
@ -475,7 +475,7 @@ def manage_spells(module):
module.fail_json(msg="failed to backup the update queue") module.fail_json(msg="failed to backup the update queue")
# see update_codex() # 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" cmd_sorcery = "%s queue"
@ -617,9 +617,8 @@ def main():
state = dict(default='present', choices=['present', 'latest', state = dict(default='present', choices=['present', 'latest',
'absent', 'cast', 'dispelled', 'rebuild']), 'absent', 'cast', 'dispelled', 'rebuild']),
depends = dict(default=None), depends = dict(default=None),
update = dict(default=False, choices=BOOLEANS, type='bool'), update = dict(default=False, type='bool'),
update_cache = dict(default=False, aliases=['update_codex'], update_cache = dict(default=False, aliases=['update_codex'], type='bool'),
choices=BOOLEANS, type='bool'),
cache_valid_time = dict(default=0, type='int') cache_valid_time = dict(default=0, type='int')
), ),
required_one_of = [['name', 'update', 'update_cache']], required_one_of = [['name', 'update', 'update_cache']],
@ -633,7 +632,7 @@ def main():
SORCERY[c] = module.get_bin_path(c, True) SORCERY[c] = module.get_bin_path(c, True)
# prepare environment: run sorcery commands without asking questions # 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 params = module.params