From 203a4f10cd9262624ff3af2cbec1402808321720 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 9 Oct 2013 07:47:08 -0400 Subject: [PATCH] Use explicit boolean defaults in apt module to make the code more clear. --- library/packaging/apt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/packaging/apt b/library/packaging/apt index 70cc7e05be..8490b8635c 100644 --- a/library/packaging/apt +++ b/library/packaging/apt @@ -307,13 +307,13 @@ def main(): module = AnsibleModule( argument_spec = dict( 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'), - purge = dict(default='no', type='bool'), + purge = dict(default=False, type='bool'), package = dict(default=None, aliases=['pkg', 'name']), default_release = dict(default=None, aliases=['default-release']), - install_recommends = dict(default='yes', aliases=['install-recommends'], type='bool'), - force = dict(default='no', type='bool'), + install_recommends = dict(default=True, aliases=['install-recommends'], type='bool'), + force = dict(default=False, type='bool'), upgrade = dict(choices=['yes', 'safe', 'full', 'dist']) ), mutually_exclusive = [['package', 'upgrade']],