Fixes for apt module
This commit is contained in:
parent
07880e6301
commit
12b7b2750c
1 changed files with 16 additions and 16 deletions
6
apt
6
apt
|
@ -138,13 +138,13 @@ def main():
|
|||
# reopen cache w/ modified config
|
||||
cache.open(progress=None)
|
||||
|
||||
if modules.boolean(p['update_cache'])
|
||||
if module.boolean(p['update_cache']):
|
||||
cache.update()
|
||||
cache.open(progress=None)
|
||||
if p['package'] == None:
|
||||
module.exit_json(changed=False)
|
||||
|
||||
force_yes = modules.boolean(p['force'])
|
||||
force_yes = module.boolean(p['force'])
|
||||
|
||||
if p['package'].count('=') > 1:
|
||||
module.fail_json(msg='invalid package spec')
|
||||
|
@ -161,7 +161,7 @@ def main():
|
|||
install(module, p['package'], cache, default_release=p['default_release'],
|
||||
install_recommends=install_recommends,force=force_yes)
|
||||
elif p['state'] == 'removed':
|
||||
remove(module, p['package'], cache, purge = modules.boolean(p['purge']))
|
||||
remove(module, p['package'], cache, purge = module.boolean(p['purge']))
|
||||
|
||||
# this is magic, see lib/ansible/module_common.py
|
||||
#<<INCLUDE_ANSIBLE_MODULE_COMMON>>
|
||||
|
|
Loading…
Reference in a new issue