Commit 61780e09 by Michael DeHaan

Merge pull request #729 from marktheunissen/fix-apt

Fixes for apt module
parents af3b0e3b 7a67145e
...@@ -138,13 +138,13 @@ def main(): ...@@ -138,13 +138,13 @@ def main():
# reopen cache w/ modified config # reopen cache w/ modified config
cache.open(progress=None) cache.open(progress=None)
if modules.boolean(p['update_cache']) if module.boolean(p['update_cache']):
cache.update() cache.update()
cache.open(progress=None) cache.open(progress=None)
if p['package'] == None: if p['package'] == None:
module.exit_json(changed=False) module.exit_json(changed=False)
force_yes = modules.boolean(p['force']) force_yes = module.boolean(p['force'])
if p['package'].count('=') > 1: if p['package'].count('=') > 1:
module.fail_json(msg='invalid package spec') module.fail_json(msg='invalid package spec')
...@@ -161,7 +161,7 @@ def main(): ...@@ -161,7 +161,7 @@ def main():
install(module, p['package'], cache, default_release=p['default_release'], install(module, p['package'], cache, default_release=p['default_release'],
install_recommends=install_recommends,force=force_yes) install_recommends=install_recommends,force=force_yes)
elif p['state'] == 'removed': 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 # this is magic, see lib/ansible/module_common.py
#<<INCLUDE_ANSIBLE_MODULE_COMMON>> #<<INCLUDE_ANSIBLE_MODULE_COMMON>>
......
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