Use explicit boolean defaults in apt module to make the code more clear.

This commit is contained in:
Michael DeHaan 2013-10-09 07:47:08 -04:00
parent 4ce2a5f8df
commit 85d0ea0d5f

View file

@ -307,13 +307,13 @@ def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec = dict( argument_spec = dict(
state = dict(default='installed', choices=['installed', 'latest', 'removed', 'absent', 'present']), state = dict(default='installed', choices=['installed', 'latest', 'removed', 'absent', 'present']),
update_cache = dict(aliases=['update-cache'], type='bool'), update_cache = dict(default=False, aliases=['update-cache'], type='bool'),
cache_valid_time = dict(type='int'), cache_valid_time = dict(type='int'),
purge = dict(default='no', type='bool'), purge = dict(default=False, type='bool'),
package = dict(default=None, aliases=['pkg', 'name']), package = dict(default=None, aliases=['pkg', 'name']),
default_release = dict(default=None, aliases=['default-release']), default_release = dict(default=None, aliases=['default-release']),
install_recommends = dict(default='yes', aliases=['install-recommends'], type='bool'), install_recommends = dict(default=True, aliases=['install-recommends'], type='bool'),
force = dict(default='no', type='bool'), force = dict(default=False, type='bool'),
upgrade = dict(choices=['yes', 'safe', 'full', 'dist']) upgrade = dict(choices=['yes', 'safe', 'full', 'dist'])
), ),
mutually_exclusive = [['package', 'upgrade']], mutually_exclusive = [['package', 'upgrade']],