From f91859c8171261c268865654c8a58687a737b0da Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 12 Nov 2014 14:20:21 -0500 Subject: [PATCH] make sure 'present' is fully equivalente of 'installed' and remove installed from feedback in favoer of 'present' --- lib/ansible/modules/packaging/os/apt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/packaging/os/apt.py b/lib/ansible/modules/packaging/os/apt.py index 834c644ef1d..867522badbe 100755 --- a/lib/ansible/modules/packaging/os/apt.py +++ b/lib/ansible/modules/packaging/os/apt.py @@ -431,7 +431,7 @@ def upgrade(m, mode="yes", force=False, default_release=None, def main(): module = AnsibleModule( argument_spec = dict( - state = dict(default='installed', choices=['installed', 'latest', 'removed', 'absent', 'present']), + state = dict(default='present', choices=['installed', 'latest', 'removed', 'absent', 'present']), update_cache = dict(default=False, aliases=['update-cache'], type='bool'), cache_valid_time = dict(type='int'), purge = dict(default=False, type='bool'), @@ -519,8 +519,8 @@ def main(): p['default_release'], dpkg_options) if p['deb']: - if p['state'] != "installed": - module.fail_json(msg="deb only supports state=installed") + if p['state'] not in ["installed", "present"]: + module.fail_json(msg="deb only supports state=present") install_deb(module, p['deb'], cache, install_recommends=install_recommends, force=force_yes, dpkg_options=p['dpkg_options'])