Fix apt module's boolean check to expect converted value

Fixes #2218.
parent cedfec76
...@@ -201,7 +201,7 @@ def main(): ...@@ -201,7 +201,7 @@ def main():
module.fail_json(msg="Cannot find apt-get") module.fail_json(msg="Cannot find apt-get")
p = module.params p = module.params
if p['package'] is None and p['update_cache'] != 'yes': if p['package'] is None and not p['update_cache']:
module.fail_json(msg='pkg=name and/or update_cache=yes is required') module.fail_json(msg='pkg=name and/or update_cache=yes is required')
install_recommends = p['install_recommends'] install_recommends = p['install_recommends']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment